Latest 0.3.1
Homepage https://github.com/shiyingfeng/NBBannerView
License MIT
Platforms ios 8.0
Dependencies Masonry, SDWebImage
Authors

CI Status
Version
License
Platform

示例图片

image

使用方式

    NBBannerView *bannerV = [NBBannerView bannerViewWithConfig:^(NBBannerConfig *config) {
    //        config.blurEffectViewColor = [UIColor redColor];
        config.showBlurEffectView = YES;
        config.showText = NO;
    //        config.textColor = [UIColor purpleColor];
    //        config.textFontSize = 36;
    } loadImageBlock:^(UIImageView *imageView, NSURL *url) {
        [imageView sd_setImageWithURL:url placeholderImage:nil];
    } loadBlurEffectBlock:^(UIImageView *imageView, NSURL *url) {
        [imageView sd_setImageWithURL:url placeholderImage:nil];
    }];
        [self.view addSubview:bannerV];
        [bannerV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self.view).offset(64);
            make.left.right.equalTo(self.view);
            make.height.equalTo(bannerV.mas_width).multipliedBy(0.6);
            }];

    NSMutableArray *arrM = [NSMutableArray array];
    for (int i = 0; i<arrData.count; i++) {
        BannerModel *bannerM = [[BannerModel alloc] init];
        bannerM.imageURL = arrData[i];
    //        bannerM.title = [NSString stringWithFormat:@"%zd",i];
        [arrM addObject:bannerM];
    }

    bannerV.bannerModels = arrM;

Installation

NBBannerView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'NBBannerView'

Author

shiyingfeng, [email protected]

License

NBBannerView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "NBBannerView",
    "version": "0.3.1",
    "summary": "u5361u7247u5f0fu8f6eu64adu56fe",
    "description": "u652fu6301masonry u548c u65cbu8f6c  u5361u7247u5f0fu8f6eu64adu56fe",
    "homepage": "https://github.com/shiyingfeng/NBBannerView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "shiyingfeng": "[email protected]"
    },
    "source": {
        "git": "https://github.com/shiyingfeng/NBBannerView.git",
        "tag": "0.3.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "NBBannerView/Classes/**/*",
    "dependencies": {
        "Masonry": [],
        "SDWebImage": []
    }
}

Pin It on Pinterest

Share This