PullToMakeSoup, 自定义下拉刷新的动画效果
x286
9年前
PullToMakeSoup, 自定义下拉刷新的动画效果。
Requirements
- iOS 8.0+
- Xcode 6.3
- Swift 1.2
Installing with CocoaPods
use_frameworks! pod 'PullToMakeSoup', '~> 1.0'
Usage
At first, import PullToMakeSoup framework:
import PullToMakeSoup
Create refresher:
let refresher = PullToMakeSoup()
Add refresher to your UIScrollView subclass and provide action block:
tableView.addPullToRefresh(refresher, action: { // action to be performed (pull data from some source) })
After the action is completed and you want to hide the refresher:
tableView.endRefresing()
You can also start refreshing programmatically:
tableView.startRefreshing()
Component was implemented based on customizable pull-to-refresh