Latest 0.4.0
Homepage https://github.com/harshalrj25/EasyPullToRefresh
License MIT
Platforms ios 8.0
Authors

EasyPullToRefresh :loudspeaker:

CI Status
Version
License
Platform

Easily integrate pull to refresh without any hassle. Handle empty tableview with a single line. No need to add anything to storyboard or xib or code.

Example :books:

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation :hourglass_flowing_sand:

EasyPullToRefresh is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'EasyPullToRefresh'

alt text

Usage :bulb:

After installation the pull to refresh will be available for every tableview inside your project.
Use below call back to handle the refresh event.

    self.tableView.customRefresh {
        // You can do your API call here
    }

Similarly if the tableview is empty, a message will be shown along with a reload button.
Use below call back to handle reload event.

    self.tableView.customReload {
        // You can do your API call here
    }

If you dont like the colors and theme, override all the controls according to your needs.
You can override default colors and appearance for the UIRefreshControl, ReloadButton and DataEmptyLabel.
Use Below variable names to access the controls

    // 1: Disable pull to refresh using the flag
    self.tableView.showPullToRefresh = false

    // 2: Disable empty tableview message and reload button
    self.tableView.showReloadOnEmpty = false

    // 3: Customize the UiRefreshControl
    self.tableView.customRefreshControl.backgroundColor = UIColor.green
    self.tableView.customRefreshControl.tintColor = UIColor.green

    // 4: Override custom message for empty tableview using below label
    self.tableView.customEmptyMessageLabel.text = "YOUR CUSTOM TEXT FOR EMPTY LIST"

    // 5: Customize the Reload button for empty tableview
    self.tableView.customReloadButton.backgroundColor = UIColor.green
    self.tableView.customReloadButton.layer.borderColor = UIColor.red.cgColor

Author :innocent:

My email id, [email protected]

Harshal Jadhav



License

It’s all your’s :gift:

Latest podspec

{
    "name": "EasyPullToRefresh",
    "version": "0.4.0",
    "summary": "One line to implement pull to refresh and handle empty list",
    "description": "Easily integrate pull to refresh without any hassle.Handle an empty tableview with a single line. No need to add anything to storyboard or xib or code.",
    "homepage": "https://github.com/harshalrj25/EasyPullToRefresh",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "harshalrj25": "[email protected]"
    },
    "source": {
        "git": "https://github.com/harshalrj25/EasyPullToRefresh.git",
        "tag": "0.4.0"
    },
    "swift_version": "4.2",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "EasyPullToRefresh/Classes/**/*"
}

Pin It on Pinterest

Share This