LXScrollViewRunLoop 版本 0.1.2

LXScrollViewRunLoop 版本 0.1.2

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布上次发布2017年5月

sunshineLixun 维护。



 
依赖
YYWebImage>= 0
YYCategories>= 0
 

LXScrollViewRunLoop 版本 0.1.2

  • sunshineLixun

       

说明  

一款实现无限轮播的开源库,目前支持纯图片轮播,并且支持 GIF 动图,陆续会增加纯文字轮播,图片加文字轮播。项目中使用 YYWebImage 来代替图片的加载和缓存,YYCategories 用来做图片的缓存清理,下载该项目会默认下载 YYWebImage 和 YYCategories。

0.0.8 版本新增垂直方向滚动

示例

banner.gif

安装

示例

LXCycleView *cycleView = [[LXCycleView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 300) images:@[@"http://www.macitup.com.au/wp-content/uploads/2014/07/apple-mac.jpg",@"http://www.secondbyte.co.uk/ekmps/shops/xelec/resources/Design/mini-27.jpg",@"http://www.cyansolutions.co.uk/wp-content/uploads/2013/10/Apple-Mac-Support-Hampshire.jpg",@"https://d13yacurqjgara.cloudfront.net/users/345826/screenshots/1780193/dots18.gif"] placeholder:nil];
    cycleView.delegate = self;
    cycleView.currentPageIndicatorTintColor = [UIColor redColor];
    cycleView.pageIndicatorTintColor = [UIColor whiteColor];
    可以不用指定的初始化方法创建一个banner 但必须设置weImages 并且不能为空。 可传入UIIiamge或者URL
     //cycleView.webImages = @[@"http://www.macitup.com.au/wp-content/uploads/2014/07/apple-mac.jpg",@"http://www.secondbyte.co.uk/ekmps/shops/xelec/resources/Design/mini-27.jpg"];
      [cycleView setDidSelectedBlock:^(NSInteger index){
        NSLog(@"%ld",index);
    }];
    [self.view addSubview:cycleView];
//代理方法
- (void)didSelectItemAtIndex:(NSInteger)index{
    NSLog(@"%ld",index);
}