AMRefresher
Super easy way to use "Pull To Refresh" and "Infinite Scrolling" with 1 line of code.
Installation
SwiftyCodeView is available through CocoaPods. To install
it, simply add the following line to your Podfile:
Or
Copy the AMRefresher folder to your project.
Usage
Adding PullToRefresh and InfiniteScrolling to any UIScrollView is pretty easy:
If you’d like to programmatically trigger the refresh (for instance in viewDidAppear:), you can do so with:
IMPORTANT NOTE
If you want to change the contentInset of the ScrollView, do that BEFORE adding pullToRefresh or infiniteScrolling.
Customization
Both AMPullToRefreshView
and AMInfiniteScrollingView
have public method
So you can call this method and pass any UIView you want to show for each state.