a simple way to use pull-to-refresh ,easy way to customize loading animation.
简单,实用的上下拉刷新,支持自动上拉加载,支持自定义加载动画。
更详细的使用请看demo 和 LovePlayNews项目
- Xcode 7 or higher
- iOS 7.0 or higher
- ARC
@interface UIScrollView (TYRefresh)
@property (nonatomic, strong) TYRefreshView *ty_refreshHeader;
@property (nonatomic, strong) TYRefreshView *ty_refreshFooter;
@end
@interface TYHeaderRefresh : TYRefreshView
+ (instancetype)headerWithAnimator:(UIView<TYRefreshAnimator> *)animator handler:(TYRefresHandler)handler;
+ (instancetype)headerWithAnimator:(UIView<TYRefreshAnimator> *)animator target:(id)target action:(SEL)action;
@interface TYFooterRefresh : TYRefreshView
+ (instancetype)footerWithAnimator:(UIView<TYRefreshAnimator> *)animator handler:(TYRefresHandler)handler;
+ (instancetype)footerWithAnimator:(UIView<TYRefreshAnimator> *)animator target:(id)target action:(SEL)action;
// 自动刷新footer
@interface TYFooterAutoRefresh : TYRefreshView
+ (instancetype)footerWithAnimator:(UIView<TYRefreshAnimator> *)animator handler:(TYRefresHandler)handler;
+ (instancetype)footerWithAnimator:(UIView<TYRefreshAnimator> *)animator target:(id)target action:(SEL)action;
如果你发现bug,please pull reqeust me
如果你有更好的改进,please pull reqeust me