Latest 1.0
Homepage https://github.com/sdupidBoby/YYBannerdemo
License MIT
Platforms ios 8.0, requires ARC
Dependencies SDWebImage, Masonry
Frameworks UIKit
Authors

iOS 实现凤凰新闻的视觉差轮播图
/ code initialize /

NSMutableArray * arr = [[NSMutableArray alloc]init];
for (int i = 1; i <= 3; i ++ ) {
    YYBannerModel * model = [[YYBannerModel alloc]init];
    model.thumb = [NSString stringWithFormat:@"CF_Album_BG5%d",i ];
    model.title = [NSString stringWithFormat:@"CF_Album_BG5%d",i ];
    [arr addObject:model];
}

YYBannerView * bannerView = [[YYBannerView alloc]initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 300)];
[self.view addSubview:bannerView];
[bannerView mas_makeConstraints:^(MASConstraintMaker *make) {
    make.top.equalTo(self.view).offset(65);
    make.left.right.equalTo(self.view);
    make.height.mas_equalTo(200);
}];
[bannerView setDataWithArray:arr TitleStyle:YYBannerTitleStyleLeft PageStyle:YYBannerPageStyleRight];
[bannerView setYYBannerType:YYBannerType_illusion];

bannerView.callBack = ^(YYBannerModel * model , int index){
    NSLog(@"CodeIndex %d", index);
};

detail!

Latest podspec

{
    "name": "YYBannerdemo",
    "summary": "A banner of illusion.",
    "version": "1.0",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "yuanshuang": "[email protected]"
    },
    "social_media_url": "https://www.jianshu.com/p/974342c2be31",
    "homepage": "https://github.com/sdupidBoby/YYBannerdemo",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/sdupidBoby/YYBannerdemo.git",
        "tag": "1.0"
    },
    "requires_arc": true,
    "source_files": "YYBannerView/*.{h,m}",
    "frameworks": "UIKit",
    "dependencies": {
        "SDWebImage": [],
        "Masonry": []
    }
}

Pin It on Pinterest

Share This