Latest 0.1.2
Homepage https://github.com/sunshineLixun/LXScrollViewRunLoop
License MIT
Platforms ios 8.0, requires ARC
Dependencies YYWebImage, YYCategories
Frameworks UIKit, CoreFoundation, QuartzCore, AssetsLibrary, ImageIO, Accelerate, MobileCoreServices, CoreGraphics, CoreImage, CoreText, ImageIO
Authors

License MIT 
CocoaPods 
CocoaPods 
Support 

说明  

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

0.0.8版本新增垂直方向滚动

0.1.0版本: 修改用initWithFrame初始化时timer不会调用的bug

Swift version

Demo

banner.gif

Installation

CocoaPods

  1. Add pod 'LXScrollViewRunLoop' to your Podfile.
  2. Run pod install or pod update.
  3. Import "LXCycleView.h".

Example

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);
}

Latest podspec

{
    "name": "LXScrollViewRunLoop",
    "version": "0.1.2",
    "summary": "A Cycle ScrollView. support gif ImageView.",
    "homepage": "https://github.com/sunshineLixun/LXScrollViewRunLoop",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "sunshineLixun": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/sunshineLixun/LXScrollViewRunLoop.git",
        "tag": "0.1.2"
    },
    "source_files": "CycleScrollView/LXCycleScrollView/**/*.{h,m}",
    "requires_arc": true,
    "frameworks": [
        "UIKit",
        "CoreFoundation",
        "QuartzCore",
        "AssetsLibrary",
        "ImageIO",
        "Accelerate",
        "MobileCoreServices",
        "CoreGraphics",
        "CoreImage",
        "CoreText",
        "ImageIO"
    ],
    "dependencies": {
        "YYWebImage": [],
        "YYCategories": []
    }
}

Pin It on Pinterest

Share This