TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2016 |
Maintained by sunshineLixun.
Depends on: | |
YYWebImage | >= 0 |
YYCategories | >= 0 |
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);
}