zzyspace / Zybannerview
Licence: mit
简单易用, 显示内容定制性强的可循环轮播控件. 可以实现类似淘宝商品详情中侧拉进入详情页的功能.
Stars: ✭ 370
Projects that are alternatives of or similar to Zybannerview
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 (+318.38%)
Mutual labels: cycle, banner
Yjbannerview
【抱歉,暂时不提供开源】A very popular and highly customized banner view, 无限循环滚动轮播图BannerView、焦点图, 支持Cocoapods 及 Carthage. 支持完全自定义
Stars: ✭ 506 (+36.76%)
Mutual labels: cycle, banner
Kjbannerviewdemo
轮播图无限自动循环滚动、缩放布局、自带缓存加载读取、支持自定义继承、定制特定样式、动态图和网图混合轮播、支持在Storyboard和Xib中创建并配置其属性、多种滚动方向选择、多种分页控件选择等等
Stars: ✭ 206 (-44.32%)
Mutual labels: cycle, banner
Cycleviewpager2
使用 ViewPager2 实现无限轮播效果,可以用来实现 banner 以及上下滚动文字广告等。Implementing android cycle viewPager with ViewPager2
Stars: ✭ 76 (-79.46%)
Mutual labels: cycle, banner
Jxpagecontrol
🚀🚀🚀 自定义pageControl指示器, 支持多种动画, 自定义布局.
Stars: ✭ 246 (-33.51%)
Mutual labels: cycle, banner
BannerView
Android BannerView 图片轮播控件,支持无限循环,可设置显示各种样式,支持添加banner切换动画。调用简单,代码稳定,体积小。
Stars: ✭ 23 (-93.78%)
Mutual labels: banner
Wmzbanner
最好用的轻量级轮播图+卡片样式+自定义样式,链式编程语法(可实现各种样式的轮播图,大多需要的功能都有)(The best lightweight carousel + card style + custom style, chain programming syntax)
Stars: ✭ 266 (-28.11%)
Mutual labels: banner
Smart-Web-App-Banner
Add this small jQuery script to your site & invite your visitors to save your site to their home screen alongside the rest of their apps!
Stars: ✭ 37 (-90%)
Mutual labels: banner
Togetherad
🔥持续更新。Android广告聚合:帮助 Android 开发者快速、便捷、灵活的接入国内多家主流安卓广告 SDK。广点通(优量汇)、穿山甲、百青藤(百度Mob)。开屏广告、Banner横幅广告、插屏广告、激励广告、原生信息流、全屏广告。
Stars: ✭ 305 (-17.57%)
Mutual labels: banner
Pyaf
PyAF is an Open Source Python library for Automatic Time Series Forecasting built on top of popular pydata modules.
Stars: ✭ 289 (-21.89%)
Mutual labels: cycle
RecyclerViewCardGallery
RecyclerView实现循环banner,替代ViewPager方案。能够快速滑动并最终定位到居中位置(相比于原库支持了循环滑动)
Stars: ✭ 610 (+64.86%)
Mutual labels: banner
Zcycleview
This is a picture/text infinite-scroll library with UICollectionView, It can be very easy to help you make the banner you want 使用UICollectionView实现常见图片/文字无限轮播,支持自定义cell,自定义pageControl,以及轮播样式
Stars: ✭ 319 (-13.78%)
Mutual labels: banner
directed graph
Dart implementation of a directed graph. Provides algorithms for sorting vertices, retrieving a topological ordering or detecting cycles.
Stars: ✭ 37 (-90%)
Mutual labels: cycle
Cardslideview
一行代码实现ViewPager卡片效果,比ViewPager2更强大,底层同样是RecyclerView
Stars: ✭ 301 (-18.65%)
Mutual labels: banner
ZYBannerView
- 简单易用的轮播控件, 基于UICollectionView实现.
Features
- [x] 显示的内容可高度自定义
- [x] 可配置循环滚动效果
- [x] 可配置是否自动滚动, 以及自动滚动时间间隔
- [x] 显示\隐藏Footer
- [x] 自定义PageControl属性
- [x] 支持在Storyboard\xib中创建并配置其属性
- [x] 支持Autolayout
Usage
Basic Usage
只需简单的2步即可快速集成此控件
1.创建Banner并设置数据源
self.banner = [[ZYBannerView alloc] initWithFrame:CGRectMake(0, 0, 200, 100)];
self.banner.dataSource = self;
[self.view addSubview:self.banner];
2.实现数据源方法
// 返回Banner需要显示Item(View)的个数
- (NSInteger)numberOfItemsInBanner:(ZYBannerView *)banner
{
return 3;
}
// 返回Banner在不同的index所要显示的View
- (UIView *)banner:(ZYBannerView *)banner viewForItemAtIndex:(NSInteger)index
{
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"xxx"]];
return imageView;
}
Advanced Usage
各种属性与方法的介绍
Property
- 是否需要循环滚动, 默认为
NO
@property (nonatomic, assign) IBInspectable BOOL shouldLoop;
- 是否显示Footer, 默认为
NO
(此属性为YES
时,shouldLoop
属性会被置为NO
)
@property (nonatomic, assign) IBInspectable BOOL showFooter;
- 是否自动滑动, 默认为
NO
@property (nonatomic, assign) IBInspectable BOOL autoScroll;
- 自动滑动间隔时间(s), 默认为 3.0
@property (nonatomic, assign) IBInspectable NSTimeInterval scrollInterval;
- Banner上显示的PageControl, 可自由配置其属性, 例如
pageIndicatorTintColor
,currentPageIndicatorTintColor
@property (nonatomic, strong, readonly) UIPageControl *pageControl;
- 根据需要设置PageControl的frame, 若不设置或者设置为CGRectZero, 则使用默认位置
@property (nonatomic, assign, readwrite) CGRect pageControlFrame;
- 数据源与代理
@property (nonatomic, weak) IBOutlet id<ZYBannerViewDataSource> dataSource;
@property (nonatomic, weak) IBOutlet id<ZYBannerViewDelegate> delegate;
NOTE :
shouldLoop
,showFooter
,autoScroll
,scrollInterval
,dataSource
,delegate
均可支持在Storyboard\xib中直接设置
Method
- 刷新Banner的数据
- (void)reloadData;
- 开始/停止用于自动滚动的定时器. 比如可以在
viewWillAppear:
和viewWillDisappear:
中分别调用这两个方法, 使得Banner没有显示的时候定时器不会一直占用着资源.
- (void)startTimer;
- (void)stopTimer;
DataSource
- 返回Banner需要显示Item(View)的个数 【required】
- (NSInteger)numberOfItemsInBanner:(ZYBannerView *)banner;
- 返回Banner在不同的
index
所要显示的View. 这个View可以是简单的一个UIImageView, 也可以是自定义的一个复杂的View. View的大小自动布局为Banner的大小, 无需对此View设置frame
【required】
- (UIView *)banner:(ZYBannerView *)banner viewForItemAtIndex:(NSInteger)index;
- 返回Footer在不同状态下(
ZYBannerFooterStateIdle
正常状态 \ZYBannerFooterStateTrigger
触发状态)显示的文字【optional】
- (NSString *)banner:(ZYBannerView *)banner titleForFooterWithState:(ZYBannerFooterState)footerState;
Delegate
- 当用户点击了第
index
个Item时, 此代理方法将被调用 【optional】
- (void)banner:(ZYBannerView *)banner didSelectItemAtIndex:(NSInteger)index;
- 当用户拖动Footer并达到触发点时, 此代理方法将被调用【optional】
- (void)bannerFooterDidTrigger:(ZYBannerView *)banner;
Requirements
- iOS 7.0+
- Xcode 5.0+
Installation
1.使用CocoaPods:
pod 'ZYBannerView'
2.手动添加:
- 将ZYBannerView文件夹中拖拽到项目中
- 导入头文件:
#import "ZYBannerView.h"
License
ZYBannerView is released under the MIT license. See LICENSE for details.
ZYBannerView in C#
Looking to incorporate ZYBannerView into your project in Xamarin? Check out ZYBannerView_Xamarin (thanks to jingliancui).
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].