Latest 1.0.1
Homepage https://github.com/Jerry0523/JWRefreshControl
License MIT
Platforms ios 8.0, requires ARC
Authors

Build Status
CocoaPods Compatible

JWRefreshControlDemo

A refresh control(refresh header & footer for scrollview) for iOS app.

Usage

Add a refresh header

self.tableView.addRefreshHeader { [weak self] (header) in
    //fetch data and reload UI
}

Add a refresh footer

self.tableView.addRefreshFooter { [weak self] (footer) in
    //fetch data and reload UI
}

Custom Content View Supported

self.webView.scrollView.addCustomRefreshHeader { [weak self] (header: RefreshHeaderControl<SloganHeaderContentView>) in
    self?.webView.reload()
    header.loadedSuccess()
}

Completion Handler

  • Notify refresh successfully

    self.tableView.refreshHeader.loadedSuccess()
  • Notify refresh error

    self.tableView.refreshHeader.loadedError(withMsg: "Network Error")
  • Notify no more data

    self.tableView.refreshFooter.loadedPause(withMsg: "No More Data")
  • Notify fetch task to stop
    self.tableView.refreshHeader.stopLoading()

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries. You can install it with the following command:

$ gem install cocoapods

Podfile

To integrate JWIntent into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

pod 'JWRefreshControl'

Then, run the following command:

$ pod install

License

(MIT license)

Latest podspec

{
    "name": "JWRefreshControl",
    "version": "1.0.1",
    "summary": "A refresh control(refresh header & footer for scrollview) for iOS app.",
    "homepage": "https://github.com/Jerry0523/JWRefreshControl",
    "license": "MIT",
    "authors": {
        "Jerry Wong": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/Jerry0523/JWRefreshControl.git",
        "tag": "1.0.1"
    },
    "source_files": "JWRefreshControl/*.swift",
    "requires_arc": true
}

Pin It on Pinterest

Share This