创建无限循环滚动视图的最简单方法。
不是最佳选择,只是更接近。
下载最新版本:master.zip.
在 Xcode 中打开项目,然后将 JXRollView.h
和 JXRollView.m
拖放到您的项目(使用“产品导航视图”)。如果您在项目外提取代码归档后,确保选中“复制项目”。
#import "JXRollView.h"
将 JXRollView 包含到您需要的地方。- (instancetype)initWithFrame:(CGRect)frame;
@property (weak, nonatomic) IBOutlet JXRollView *rollView;
@protocol JXRollViewDelegate <NSObject>
@required
- (NSInteger)numberOfItemsInRollView:(nonnull JXRollView *)rollView;
- (void)rollView:(nonnull JXRollView *)rollView setImageForImageView:(nonnull UIImageView *)imageView atIndex:(NSInteger)index;
@optional
- (void)rollView:(nonnull JXRollView *)rollView didTapItemAtIndex:(NSInteger)index;
@end
- (void)reloadData;
JXRollView 在 MIT 许可证 的条款和条件下分发。