Latest0.1.2
Homepagehttps://github.com/RedPlumber/RPPullDownToRefresh
LicenseMIT
Platformsios 8.0, requires ARC
Authors

CI Status
Version
License
Platform

Usage

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

Requirements

  • iOS 8.0+
  • Xcode 6.3
  • Swift 1.2

Installation

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

use_frameworks!
pod "RPPullDownToRefresh"

alt tag

HOW TO USE IT

At first, import RPPullDownToRefresh framework:

import RPPullDownToRefresh

Ccreate the refresh control, add it to your view and provide and provide the end action

class ViewController: UIViewController{

    var refreshControl : PullDownToRefresh?

    override func viewDidLoad() {
        super.viewDidLoad()

        var colors = [UIColor.yellowColor(), UIColor.purpleColor(), UIColor.cyanColor(), UIColor.brownColor()]

        self.refreshControl = PullDownToRefresh(scrollView: self.tableView, marginFromTop : 64, colors : colors)
        self.view.addSubview(self.refreshControl!)
        self.refreshControl?.addTarget(self, action: "refreshData:", forControlEvents: UIControlEvents.ValueChanged)
    }

    func refreshData(sender : AnyObject?){
        let delay = 5 * Double(NSEC_PER_SEC)
        let time = dispatch_time(DISPATCH_TIME_NOW, Int64(delay))
        dispatch_after(time, dispatch_get_main_queue()) {
            self.refreshControl!.stopRefreshing()
        }
    }

Author

Francesco Petrungaro (RedPlumber), [email protected]

License

RPPullDownToRefresh is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "RPPullDownToRefresh",
    "version": "0.1.2",
    "summary": "iOS Custom pull-to-refresh",
    "description": "Custom animated pull-to-refresh",
    "homepage": "https://github.com/RedPlumber/RPPullDownToRefresh",
    "license": "MIT",
    "authors": {
        "Francesco Petrungaro (RedPlumber)": "[email protected]"
    },
    "source": {
        "git": "https://github.com/RedPlumber/RPPullDownToRefresh.git",
        "tag": "0.1.2"
    },
    "social_media_url": "https://twitter.com/petrungarof",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "RPPullDownToRefresh": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This