Latest | 1.0.5 |
---|---|
Homepage | https://github.com/ydj/DJRefresh |
License | MIT |
Platforms | ios 6.0, requires ARC |
Frameworks | Foundation, UIKit |
Authors |
DJRefresh 是一个下拉刷新,上拉加载更多的组件,
支持横竖屏切换,支持自定义下拉View
和加载View
,继承自UIScrollView
的控件都可以使用,支持UIWebView
下拉刷新
platform :ios, '6.0'
pod 'DJRefresh', '~> 1.0.5'
使用简单
///初始化
_refresh=[[DJRefresh alloc] initWithScrollView:tableView delegate:self];
///设置显示下拉刷新
_refresh.topEnabled=YES;
///显示加载更多
_refresh.bottomEnabled=YES;
实现代理方法,去刷新或者加载数据
- (void)refresh:(DJRefresh *)refresh didEngageRefreshDirection:(DJRefreshDirection) direction
或 设置调用方法在Block回调进行操作
- (void)didRefreshCompletionBlock:(DJRefreshCompletionBlock)completionBlock;
自定义加载样式
支持自定义样式,只需要继承DJRefreshView
注册一下该类即可.
如自定义的控件是SampleRefreshView
:
///注册自定义的下拉刷新view
[_refresh registerClassForTopView:[SampleRefreshView class]];
其他
1.设置下拉改变状态的位置`enableInsetTop` 默认65.0
2.设置上拉改变状态的位置`enableInsetBottom` 默认65.0
3.下拉到指定位置自动刷新`autoRefreshTop` 默认NO
4.上拉到指定位置自动加载`autoRefreshBottom` 默认NO
协议
DJRefresh 被许可在 MIT 协议下使用。查阅 LICENSE 文件来获得更多信息。
Latest podspec
{ "name": "DJRefresh", "version": "1.0.5", "summary": "DJRefresh is quick to realize the pull refresh.", "homepage": "https://github.com/ydj/DJRefresh", "license": "MIT", "authors": { "YDJ": "[email protected]" }, "platforms": { "ios": "6.0" }, "source": { "git": "https://github.com/ydj/DJRefresh.git", "tag": "1.0.5" }, "source_files": "DJRefresh/**/*.{h,m}", "resources": "DJRefresh/DJRefresh.bundle", "requires_arc": true, "frameworks": [ "Foundation", "UIKit" ] }
Sun, 28 Feb 2016 01:36:03 +0000