1.将BCLoopScrollImageView拖到自己的项目中
2.在使用的时候调用初始化方法:- (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];
//只需初始化就可以实现效果
BCLoopScrollImageView * loopScrollImageView =[[BCLoopScrollImageView alloc] initWithFrame:CGRectMake(0, 64, self.view.frame.size.width, 130) images:imageDataSource];
[self.view addSubview:loopScrollImageView];
}