LXCycleScrollView 0.01

LXCycleScrollView 0.01

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最近发布2016年12月

sunshineLixun 维护。



 
依赖
YYWebImage>= 0
YYCategories>= 0
 

  • 作者:
  • sunshineLixun

     

演示

banner.gif

banner2.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",
                                                                                                                                        @"http://store.storeimages.cdn-apple.com/8749/as-images.apple.com/is/image/AppleInc/aos/published/images/m/ac/mac/mini/mac-mini-2014-gallery2?wid=975&hei=535&fmt=jpeg&qlt=95&op_sharpen=0&resMode=bicub&op_usm=0.5,0.5,0,0&iccEmbed=0&layer=comp&.v=CMvlZ1"
                                                                                                                                        ] 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"];
    [self.view addSubview:cycleView];
//代理方法
- (void)didSelectItemAtIndex:(NSInteger)index{
    NSLog(@"%ld",index);
}