项目介绍:
Custom animated pull-to-refresh that can be easily added to UIScrollView
PullToMakeSoup 是一个下拉刷新控件,自定义动画效果,效果如gif图所示,可以轻松的加在UIScrollView之上。
Requirements
- iOS 8.0+
- Xcode 7
- Swift 2
集成过程:1、支持Carthage , CocoaPods
Carthage
github "Yalantis/PullToMakeSoup" "master"
Installing with CocoaPods
use_frameworks!pod ‘PullToMakeSoup’, ‘~> 1.2’
Usage 集成代码
[Objective-C] 查看源文件 复制代码
import PullToMakeSoup let refresher = PullToMakeSoup() Add refresher to your UIScrollView subclass in 'viewDidAppear' method and provide action block: override func viewDidAppear(animated: Bool) { super.viewDidAppear(animated) tableView.addPullToRefresh(refresher, action: { // action to be performed (pull data from some source) }) }
DEMO 直接下载: