Latest 1.4.5
Homepage https://github.com/joshpc/ElasticPullToRefresh
License MIT
Platforms ios 11.0
Authors

ElasticPullToRefresh is a very simple and slightly customizable pull to refresh control that has a spinner.

pulltorefresh

Usage

Details

Builds using iOS 11.2+, Swift 4.

Installation

Use CocoaPods: pod 'ElasticPullToRefresh'

Code Changes

Import the module where necessary, import ElasticPullToRefresh

Use the ElasticPullToRefresh wrapper to wrap your UIScrollView or UITableView (or anything else that scrolls. Do not manually add that UIScrollView or UITableView to the view hiearchy. Add the ElasticPullToRefresh wrapper instead.

override func loadView() {
  let tableView = UITableView()
  let wrapper = ElasticPullToRefresh(scrollView: tableView)
  view = wrapper
}

Set a didPullToRefresh block. Use this to trigger your downloads. When you’re done, call didFinishRefreshing(). That’s it!

wrapper.didPullToRefresh = {
  downloadData()
  ...
  //call when done loading
  wrapper.didFinishRefreshing()
}

Latest podspec

{
    "name": "ElasticPullToRefresh",
    "version": "1.4.5",
    "summary": "A pull to refresh control that has a simple, elegant spinner",
    "homepage": "https://github.com/joshpc/ElasticPullToRefresh",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "authors": {
        "Joshua Tessier": "[email protected]"
    },
    "platforms": {
        "ios": "11.0"
    },
    "swift_version": "4.0",
    "source": {
        "git": "https://github.com/joshpc/ElasticPullToRefresh.git",
        "tag": "1.4.5"
    },
    "source_files": "ElasticPullToRefresh"
}

Pin It on Pinterest

Share This