/SGAdvertScrollView

advertisement carousel view for iOS (天猫、京东等 app 首页广告滚动视图)

Primary LanguageObjective-CMIT LicenseMIT

SGAdvertScrollView

效果图

Dependency

SDWebImage

SGAdvertScrollView 集成

  • 1、CocoaPods 导入 pod 'SGAdvertScrollView'

  • 2、下载、拖拽 “SGAdvertScrollView” 文件夹到工程中

代码介绍(详细使用,请参考 Demo)

例一

    _advertScrollView.titles = @[@"常见电商类 app 滚动播放广告信息", @"采用代理模式封装, 可进行事件点击处理", @"建议去 github 上下载"];
        
    _advertScrollView.delegate = self;

代理方法

    - (void)advertScrollView:(SGAdvertScrollView *)advertScrollView didSelectedItemAtIndex:(NSInteger)index {
    
        DetailViewController *nextVC = [[DetailViewController alloc] init];
        
        [self.navigationController pushViewController:nextVC animated:YES];
        
    }

例二

    NSArray *topTitleArr = @[@"聚惠女王节,香米更低价满150减10", @"HTC新品首发,预约送大礼包", @"“挑食”进口生鲜,满199减20"];
    
    NSArray *bottomSignImageArr = @[@"hot", @"", @"activity"];
    
    NSArray *bottomTitleArr = @[@"满150减10+满79减5", @"12期免息+免费试用", @"领券满199减20+进口直达"] ;
    
    _advertScrollView2.advertScrollViewStyle = SGAdvertScrollViewStyleMore;
    
    _advertScrollView2.topTitles = topTitleArr;
    
    _advertScrollView2.bottomSignImages = bottomSignImageArr;
    
    _advertScrollView2.bottomTitles = bottomTitleArr;
    
    _advertScrollView2.bottomTitleColor = [UIColor redColor];

版本介绍

  • 2017-7-20 --> v1.1.8 修复 UICollectionView 偏移量问题

  • 2017-8-2 --> v1.2.0 解决标题无数据引起的崩溃问题

Concluding remarks