1.將BCLoopScrollImageView拖到自己的項(xiàng)目中
2.在使用的時(shí)候調(diào)用初始化方法:- (id) initWithFrame:(CGRect)frame images:(NSArray *)images即可完成輪播效果
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"UIImage自動輪播";
NSArray *imageDataSource = [NSArray arrayWithObjects:@"1.jpg", @"2.jpg", @"3.jpg", nil,nil];
//只需初始化就可以實(shí)現(xiàn)效果
BCLoopScrollImageView * loopScrollImageView =[[BCLoopScrollImageView alloc] initWithFrame:CGRectMake(0, 64, self.view.frame.size.width, 130) images:imageDataSource];
[self.view addSubview:loopScrollImageView];
}