Latest 0.9.3
License MIT
Platforms ios 8.0, requires ARC

Version License Platform
Carthage compatible

SwiftRefresher solves your problem on UIRefreshControl on UITableView in UIViewController! SwiftRefresher is one of the alternatives of UIRefreshControl. Moreover, it is very customizable!



  • Simple and easy to use.
  • Customize loading view whatever you want.



Add codes below and add it to UITableView with srf_addRefresher. The closure will be called when refresh starts.

let refresher = RefresherView { [weak self] () -> Void in

And call srf_endRefreshing() whenever/wherever your refreshing task finished.


Use with a little Customize

The view of SwiftRefresher is independent from its main system. The only requirement is to conform to SwfitRefresherEventReceivable protocol. Default view is SimpleRefreshView. You can use it with a little customization like this below:

let refresher = Refresher { [weak self] () -> Void in
refresher.createCustomRefreshView { () -> SwfitRefresherEventReceivable in
    return SimpleRefreshView(activityIndicatorViewStyle: .White)

In this example, I changed SimpleRefreshView’s activityIndicatorViewStyle to .White. But you can customize more with create your own refreh view!


Just create a view with conforming to SwfitRefresherEventReceivable. SwfitRefresherEventReceivable has one required function func didReceiveEvent(event: SwiftRefresherEvent). Through this function, refresher send the view the events. The events are below:

public enum SwiftRefresherEvent {
    case Pull(offset: CGPoint, threshold: CGFloat)
    case StartRefreshing
    case EndRefreshing
    case RecoveredToInitialState

For example, preset SimpleRefreshView has this easy codes.

public func didReceiveEvent(event: SwiftRefresherEvent) {
    switch event {
    case .Pull:
        pullingImageView.hidden = false
    case .StartRefreshing:
        pullingImageView.hidden = true
    case .EndRefreshing:
    case .RecoveredToInitialState:

RecoveredToInitialState means that after EndRefreshing, the view will go back to initial state. And then the state becamed to the initial, this event will be called.

Runtime Requirements

  • iOS8.1 or later
  • Xcode 8.0 or later
  • Swift 3.0 or later

Installation and Setup

Installing with Carthage

Just add to your Cartfile:

github "morizotter/SwiftRefresher"

Installing with CocoaPods

CocoaPods is a centralised dependency manager that automates the process of adding libraries to your Cocoa application. You can install it with the following command:

$ gem update
$ gem install cocoapods
$ pods --version

To integrate SwiftRefresher into your Xcode project using CocoaPods, specify it in your Podfile and run pod install.

platform :ios, '8.1'
pod "SwiftRefresher", '~>0.9.0'

Manual Installation

To install SwiftRefresher without a dependency manager, please add all of the files in /SwiftRefresher to your Xcode Project.


Please file issues or submit pull requests for anything you’d like to see! We’re waiting! :)


SwiftRefresher is released under the MIT license. Go read the LICENSE file for more information.

Latest podspec

    "name": "SwiftRefresher",
    "version": "0.9.3",
    "summary": "SwiftRefresher is one of the alternatives of UIRefreshControl.",
    "description": "- Simple and easy to use.n- Customize loading view whatever you want.",
    "homepage": "",
    "screenshots": "",
    "license": "MIT",
    "authors": {
        "Morita Naoki": "[email protected]"
    "platforms": {
        "ios": "8.0"
    "source": {
        "git": "",
        "tag": "0.9.3"
    "source_files": "SwiftRefresher/**/*.swift",
    "resources": "SwiftRefresher/Resources/*.png",
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This