stackhou / Yjbannerview
Licence: apache-2.0
【抱歉,暂时不提供开源】A very popular and highly customized banner view, 无限循环滚动轮播图BannerView、焦点图, 支持Cocoapods 及 Carthage. 支持完全自定义
Stars: ✭ 506
Projects that are alternatives of or similar to Yjbannerview
Txscrolllabelview
🌭TXScrollLabelView, the best way to show & display information such as adverts / boardcast / onsale e.g. with a customView.
Stars: ✭ 714 (+41.11%)
Mutual labels: cycle, scrolling, scrollview
Zybannerview
简单易用, 显示内容定制性强的可循环轮播控件. 可以实现类似淘宝商品详情中侧拉进入详情页的功能.
Stars: ✭ 370 (-26.88%)
Mutual labels: cycle, banner
Cycleviewpager2
使用 ViewPager2 实现无限轮播效果,可以用来实现 banner 以及上下滚动文字广告等。Implementing android cycle viewPager with ViewPager2
Stars: ✭ 76 (-84.98%)
Mutual labels: cycle, banner
Smkcyclescrollview
SMKCycleScrollView - An awesome advertisement cycleScrollView
Stars: ✭ 11 (-97.83%)
Mutual labels: cycle, scrollview
Tycyclepagerview
a simple and usefull cycle pager view ,and auto scroll banner view(轮播图) ,include pageControl for iOS,support Objective-C and swift
Stars: ✭ 1,548 (+205.93%)
Mutual labels: cycle, banner
Jxpagecontrol
🚀🚀🚀 自定义pageControl指示器, 支持多种动画, 自定义布局.
Stars: ✭ 246 (-51.38%)
Mutual labels: cycle, banner
Kjbannerviewdemo
轮播图无限自动循环滚动、缩放布局、自带缓存加载读取、支持自定义继承、定制特定样式、动态图和网图混合轮播、支持在Storyboard和Xib中创建并配置其属性、多种滚动方向选择、多种分页控件选择等等
Stars: ✭ 206 (-59.29%)
Mutual labels: cycle, banner
EmbeddedScrollView
Embedded UIScrollView for iOS.
Stars: ✭ 55 (-89.13%)
Mutual labels: scrolling, scrollview
Tlyshynavbar
Unlike all those arrogant UINavigationBar, this one is shy and humble! Easily create auto-scrolling navigation bars!
Stars: ✭ 3,780 (+647.04%)
Mutual labels: scrolling, scrollview
Sweet Scroll
🍭 ECMAScript2015+ & TypeScript Friendly, dependency-free smooth scroll library.
Stars: ✭ 380 (-24.9%)
Mutual labels: scrolling
Pagepiling.js
pagePiling plugin by Alvaro Trigo. Create a scrolling pile of sections. http://alvarotrigo.com/pagePiling/
Stars: ✭ 3,993 (+689.13%)
Mutual labels: scrolling
Mac Mouse Fix
Mac Mouse Fix - A simple way to make your mouse better.
Stars: ✭ 362 (-28.46%)
Mutual labels: scrolling
Immersivedetailsample
A sample application show how to realize immersive parallax effect header like Google Play Store
Stars: ✭ 457 (-9.68%)
Mutual labels: scrollview
Jxbanner
🚀🚀🚀 A super - custom multifunctional framework for banner unlimited rollover diagrams [一个超自定义多功能无限轮播图框架]
Stars: ✭ 358 (-29.25%)
Mutual labels: banner
Indicatorscrollview
🧀 A dynamic scroll view that animates indicators according to its scroll position.
Stars: ✭ 355 (-29.84%)
Mutual labels: scrollview
Theia Sticky Sidebar
Glues your website's sidebars, making them permanently visible while scrolling.
Stars: ✭ 489 (-3.36%)
Mutual labels: scrolling
Recycler Fast Scroll
Provides fast scroll and section idexer for recycler view
Stars: ✭ 445 (-12.06%)
Mutual labels: scrolling
YJBannerView
- 使用简单、功能丰富的
Objective-C版
轮播控件, 基于UICollectionView
实现, 多种场景均支持使用.
效果样例
普通 | 自定义View |
---|---|
Features
- [x] 支持自带PageControl样式配置, 也支持自定义
- [x] 支持上、下、左、右四个方向自动、手动动滚动
- [x] 支持自动滚动时间设置
- [x] 支持首尾循环滚动的开关
- [x] 支持滚动相关手势的开关
- [x] 支持ContentMode的设置
- [x] 支持Banner标题的设置自定义
- [x] 支持自定义UICollectionViewCell
- [x] 支持在Storyboard\xib中创建并配置其属性
- [x] 支持非首尾循环的Footer样式和进入详情回调
- [x] 不依赖其他三方SDWebImage或者AFNetworking设置图片
- [x] 支持CocoaPods
- [x] 支持Carthage
- [x] 支持获取当前位置的自身偏移量
Installation
Cocoapods
YJBannerView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'YJBannerView'
Carthage
github "stackhou/YJBannerView"
Usage
1.创建BannerView:
-(YJBannerView *)normalBannerView{
if (!_normalBannerView) {
_normalBannerView = [YJBannerView bannerViewWithFrame:CGRectMake(0, 20, kSCREEN_WIDTH, 180) dataSource:self delegate:self placeholderImageName:@"placeholder" selectorString:@"sd_setImageWithURL:placeholderImage:"];
_normalBannerView.pageControlAliment = PageControlAlimentRight;
_normalBannerView.autoDuration = 2.5f;
}
return _normalBannerView;
}
2.实现数据源方法和代理:
// 将网络图片或者本地图片 或者混合数组
- (NSArray *)bannerViewImages:(YJBannerView *)bannerView{
return self.imageDataSources;
}
// 将标题对应数组传递给bannerView 如果不需要, 可以不实现该方法
- (NSArray *)bannerViewTitles:(YJBannerView *)bannerView{
return self.titlesDataSources;
}
// 代理方法 点击了哪个bannerView 的 第几个元素
-(void)bannerView:(YJBannerView *)bannerView didSelectItemAtIndex:(NSInteger)index{
NSString *title = [self.titlesDataSources objectAtIndex:index];
NSLog(@"当前%@-->%@", bannerView, title);
}
扩展自定义方法
// 自定义Cell方法
- (Class)bannerViewCustomCellClass:(YJBannerView *)bannerView{
return [HeadLinesCell class];
}
// 自定义Cell的数据刷新方法
- (void)bannerView:(YJBannerView *)bannerView customCell:(UICollectionViewCell *)customCell index:(NSInteger)index{
HeadLinesCell *cell = (HeadLinesCell *)customCell;
[cell cellWithHeadHotLineCellData:@"打折活动开始了~~快来抢购啊"];
}
版本记录
日期 | 版本号 | 更新内容 |
---|---|---|
2015-5-10~2016-10-17 | 1.0~2.0 | 2.0之前的更新内容没有实际意义,省略... |
2016-10-17~2017-01-01 | 2.0~2.1 | 功能完善Bug修复等 |
2017-01-01~2017-07-30 | 2.1~2.2 | 主要功能优化,新增FooterView等 |
2017-7-30~2017-09-30 | 2.2.0~2.3.0 | 调优、降低内存消耗等 |
2017-9-30 | 2.3.0 | 调优 创建该控件由原来的120毫秒 优化到只需要60毫秒左右,和创建一个UILabel相当。 |
2017-11-1 | 2.3.1 | 增加停止定时器和重新开启定时器API |
2017-11-16 | 2.3.2 | 修复当数据为空时刷新后再次有数据刷新不滚动问题 |
2017-12-05 | 2.3.4 | 规范图片加载流程 |
2017-12-06 | 2.3.5 | 区分没有数据的占位图片和图片未加载的占位图片 |
2017-12-14 | 2.3.6 | 数据安全保护和数据更新速度优化 |
2017-12-15 | 2.3.7 | 增加当前滚动位置相对偏移量API |
2018-01-18 | 2.3.8 | 优化自定义View的实现方式,支持不同位置的Banner自由选择显示类型 |
2018-06-21 | 2.3.9 | 更新 Cocoapods 配置 Source 的修正 |
2018-07-09 | 2.4.0 | 修改手势在iOS 8.1上面的 Crash Bug |
性能表现
- 简单设置时:
- 复杂设置时:
License
This code is distributed under the terms and conditions of the MIT license.
Change-log
A brief summary of each YJBannerView release can be found in the CHANGELOG.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].