SwiftRefresher is a good alternative of UIRefreshControl
SwiftRefresher is a good alternative of UIRefreshControl. This library solves one big problem and offer one good feature to widen programmer’s freedom.


Solve the problem of UIRefreshControl on UITableView in UIViewController
UIRefreshCotrol works well in UITableViewController. But it is mostly used on UITableView in UIViewController. In this case, UIRefreshControl works strange because UIRefreshControl is supposed to work on UITableViewController.
SwiftRefresher solves this problem. It works well also on UITableView itself. When pulling over the designated height — default 44px, the refresh event fires.
Widen developer’s freedom with fully customizabe view
SwiftRefresher is easily customizable. The view is a subclass of UIView comforming to SwiftRefresherEventReceivable. If you want to customize SwiftRefresher, pass your view to it with:
createCustomRefreshView(creator: SwiftRefresherCustomRefreshViewCreator)
SwiftRefresherEventReceivable needs didReceiveEvent function which you can get refresher events. The example below is how it is implemented in default SwiftRefresher:
public func didReceiveEvent(event: SwiftRefresherEvent) {
switch event {
case .Pull:
pullingImageView.hidden = false
case .StartRefreshing:
pullingImageView.hidden = true
activityIndicatorView.startAnimating()
case .EndRefreshing:
activityIndicatorView.stopAnimating()
case .RecoveredToInitialState:
break
}
}That’s all. It’s easy to change view responding to the events.
If you are suffering from UIRefreshControl on UITableView or want to customize refresher easily. Let’s try to use SwiftRefresher. It will save your time and serve your good product!