KVRefreshable
[![CI Status](http://img.shields.io/travis/Vu Van Khac/KVRefreshable.svg?style=flat)](https://travis-ci.org/Vu Van Khac/KVRefreshable)
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
- iOS 8.0+
- Swift 5.0
Installation
KVRefreshable is available through CocoaPods. To install it, simply add the following line to your Podfile:
# For Swift 5.0
pod 'KVRefreshable', '~> 2.0.3'
Usage
Adding pull to refresh
tableView.addPullToRefreshWithActionHandler {
// Stop pull to refresh animation
self.tableView.pullToRefreshView.stopAnimating()
}
Trigger the pull to refresh
tableView.triggerPullToRefresh()
Show the pull to refresh view
tableView.showsPullToRefresh = true
Hide the pull to refresh view
tableView.showsPullToRefresh = false
Adding infinite scrolling
tableView.addInfiniteScrollingWithActionHandler {
// Stop infinite scrolling animation
self.tableView.infiniteScrollingView.stopAnimating()
}
Trigger the infinite scrolling
tableView.triggerPullToRefresh()
Show the infinite scrolling view
tableView.showsInfiniteScrolling = true
Hide the infinite scrolling view
tableView.showsInfiniteScrolling = false
Author
Vu Van Khac, [email protected]
My Facebook: https://www.facebook.com/vuvankhac.official
My Twitter: https://twitter.com/vuvankhac
License
KVRefreshable is available under the MIT license. See the LICENSE file for more info.