TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Jul 2016 |
SPMSupports SPM | ✗ |
Maintained by xtrinch.
Pull to refresh and load more loader with delegate methods for UITableViews, UICollectionViews (and planned: UIScrollviews). Its usage is extremely simple as it onnly requires setting a class on your uiview. Example project contains tableview and horizontally scrolling collectionview.
To run the example project, clone the repo, and run pod install
from the Example directory first.
Pull to refresh a table view:
Load more in a table view:
Pull to refresh in horizontally scrolling collection view:
import MRPullToRefreshLoadMore
class ViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, MRPullToRefreshLoadMoreDelegate {
@IBOutlet weak var tableView: MRTableView!
override func viewDidLoad() {
super.viewDidLoad()
tableView.delegate = self
tableView.dataSource = self
tableView.pullToRefresh.pullToRefreshLoadMoreDelegate = self
}
func viewShouldRefresh() {
// refresh tableview
}
func viewShouldLoadMore() {
// load more in tableview
}
}
Available classes: MRTableView, MRCollectionView
MRPullToRefreshLoadMore is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "MRPullToRefreshLoadMore"
xTrinch, [email protected]
MRPullToRefreshLoadMore is available under the MIT license. See the LICENSE file for more info.