Git Product home page Git Product logo

sgadvertscrollview's Introduction

SGAdvertScrollView

  • QQ群:429899752

效果图

Dependency

SDWebImage

SGAdvertScrollView 集成

  • 1、CocoaPods 导入 pod 'SGAdvertScrollView','~> 1.2.7'

  • 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];

问题及解决方案

1、CocoaPods 安装 SGAdvertScrollView 时,遇到的问题及解决方案

  • 若在使用 CocoaPods 安装 SGAdvertScrollView 时,出现 [!] Unable to find a specification for SGAdvertScrollView 提示时,打开终端先输入 pod repo remove master;执行完毕后再输入 pod setup 即可 (可能会等待一段时间)

2、SGAdvertScrollView 滚动存在混乱问题及解决方案(只有 SGAdvertScrollView 的高度或其父视图的高度不为整数时,才会出现)

  • 解决方案:高度取整 ceil(SGAdvertScrollView 高度或其父视图高度); 若包装有父视图则父视图高度取整;若无包装父视图则 SGAdvertScrollView 高度取整

版本介绍

  • 2017-07-20 :v1.1.8 修复 UICollectionView 偏移量问题

  • 2017-08-02 :v1.2.0 解决标题无数据引起的崩溃问题

  • 2017-09-27 :v1.2.6 API 的规范以及更新到对 SDWebImage 4.1.0 的依赖

  • 2017-11-16 :v1.2.7 解决 Xcode 9 控制台打印问题以及性能优化

License

SGAdvertScrollView is released under the MIT license. See LICENSE for details.

sgadvertscrollview's People

Contributors

kingsic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sgadvertscrollview's Issues

需求

水平滚动的样式,能考虑一下么

求教

[self.collectionView scrollToItemAtIndexPath:nextIndexPath atScrollPosition:UICollectionViewScrollPositionBottom animated:YES]; 能否设置其动画的时长....
2017-11-15 4 25 47
这种效果有啥好的实现方式嘛 O(∩_∩)O~

依赖库

请问下cocopod下两个第三方的库 同时都依赖SDWebImage这个第三方库,会依赖冲突,请问下如何解决,谢谢。。。两个依赖库的版本不同导致出错。。
[!] Unable to satisfy the following requirements:

  • SDWebImage (~> 4.1.0) required by SGAdvertScrollView (1.2.6)
  • SDWebImage (~> 4.0.0) required by SDCycleScrollView (1.66)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.