HAutoScrollView
循环滚动视图,支持自动滚动、支持点击事件代理回调,已处理 NSTimer 销毁,处理 AutoLayout 适配。
启动自动滚动
[autoScroll setAutoFlip:true];
设置滚动时间
[autoScroll setFlipInterval:3.0];
Delegate&DataSource
[autoScroll setDelegate:self];
[autoScroll setDataSource:self];
点击事件
-(void)autoScrollView:(HAutoScrollView *)asView didSelectAtPageIndex:(NSInteger)pIndex;
数据源
-(NSInteger)numberOfPagesInHAutoScrollView:(HAutoScrollView *)asView;
-(UIView *)pageAtIndex:(NSInteger)index autoScrollView:(HAutoScrollView *)asView;
安装
HAutoScrollView 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中:
pod "HAutoScrollView"
许可证
HAutoScrollView 适用于 MIT 许可证。有关更多信息,请参阅 LICENSE 文件。
===
效果图
1 | 2 | 3 |
---|---|---|
![]() |
![]() |
![]() |