测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | MIT |
发布最后发布 | 2016 年 10 月 |
由 hw20101101 维护。
依赖项 | |
Masonry | >= 0 |
SDWebImage | >= 0 |
NSArray *imageUrlArray = @[@"http://pic24.nipic.com/20121003/10754047_140022530392_2.jpg", @"http://img15.3lian.com/2015/a1/13/d/17.jpg", @"http://pic36.nipic.com/20131022/7786988_135813187182_2.jpg"];
HWAutoScrollView *view = [[HWAutoScrollView alloc] initWithImageUrlArray:imageUrlArray placeHolder:@"loadingImage" imageOnClickCallBack:^(int imageIndex){
NSLog(@"-->> RemoteImageIndex:%d", imageIndex);
}];
[self.view addSubview:view];
__weak typeof(self) weakSelf = self;
[view makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(weakSelf.view);
make.top.equalTo(weakSelf.remoteLabel.bottom).offset(5);
make.height.equalTo(@(150));
}];
NSArray *imageNameArray = @[@"0001_meitu", @"0002_meitu", @"0003_meitu"];
HWAutoScrollView *view = [[HWAutoScrollView alloc] initWithImageNameArray:imageNameArray imageOnClickCallBack:^(int imageIndex){
NSLog(@"-->> LocalImageIndex:%d", imageIndex);
}];
[self.view addSubview:view];
__weak typeof(self) weakSelf = self;
[view makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(weakSelf.view);
make.top.equalTo(weakSelf.localLabel.bottom).offset(5);
make.height.equalTo(@(150));
}];
Podfile
platform :ios, '7.0'
pod 'HWAutoScrollView'
通过以下命令完成安装
$ pod install
在需要使用此库的源文件中导入头文件
#import "HWAutoScrollView.h"