GFPullToRefresh 1.1.1

GFPullToRefresh 1.1.1

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布上次发布2016年11月

Mercy 维护。



  • 作者
  • Mercy

GFPullToRefresh 是一个简单且低耦合的 pull-to-refresh 模块,非常容易使用。

安装

GFPullToRefresh 在 CocoaPods 上可用。只需将以下代码添加到你的项目 Podfile 中

pod 'GFPullToRefresh', '~> 1.0.0'

使用

1、导入头文件

#import GFPullToRefresh.h

2、添加下拉刷新功能

[self.tableView addHeaderWithHandler:^{
    // put your network request statements here
    // when it's down, use [self.tableView endHeaderRefresh] to end refresh
}];

3、添加上拉刷新功能

[self.tableView addFooterWithHandler:^{
    // put your network request statements here
    // when it's down, use [self.tableView endFooterRefresh] to end refresh
}];

注意

  1. 此模块可用于 UIScrollView 及其子类 (UITableView 和 UICollectionView)。
  2. 你可以使用 [self.tableView beginHeaderRefresh] 来启动自动刷新。

许可证

GFPullToRefresh 根据 MIT 许可证发布

Copyright (c) 2015 Gu Gaofei (@gydmercy)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.