Skip to content

a simple way to use pull-to-refresh (上下拉刷新),easy way to customize loading animation(自定义加载动画).

License

Notifications You must be signed in to change notification settings

12207480/TYRefresh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TYRefresh

a simple way to use pull-to-refresh ,easy way to customize loading animation.
简单,实用的上下拉刷新,支持自动上拉加载,支持自定义加载动画。

更详细的使用请看demo 和 LovePlayNews项目

Requirements

  • Xcode 7 or higher
  • iOS 7.0 or higher
  • ARC

ScreenShot

  • 普通上下拉刷新
    image

  • 自动上下拉刷新
    image

  • 上下拉刷新没有更多数据和失败状态
    image

  • 上下拉刷新自适应设置contentInset
    image

Usage

@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;

Contact

如果你发现bug,please pull reqeust me
如果你有更好的改进,please pull reqeust me

About

a simple way to use pull-to-refresh (上下拉刷新),easy way to customize loading animation(自定义加载动画).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages