Latest 1.0.0
Homepage https://github.com/Harmek/HKRefreshControl
License MIT
Platforms ios 5.0, requires ARC
Dependencies HKCircularProgressView
Authors

Screenshot

HKRefreshControl is a refresh control that mimics iOS6’s UIRefreshControl behavior but is also available for iOS5.
It uses HKCircularProgressView to show the animated "pull progress" and "activity indicator" views but you can also implement views of your own.

How to use it

  1. Use CocoaPods by adding pod ‘HKRefreshControl’ in your Podfile.
  2. Manually:
    • Clone this repository
    • Copy HKRefreshControl and UITableViewController+HKRefreshControl files (.h and .m) into your project and do not forget HKCircularProgressView.

How to configure it

A refresh control is usually used with a UITableView. This is why we included an extension to the UITableViewController class, to mimic UIRefreshControl’s usage.

In order to associate your UITableView with a HKRefreshControl:

  • In your UITableViewController, set the customRefreshControl property (using a simple [[HKRefreshControl alloc] init]).
  • Add a target and action for the UIControlEventValueChanged control event.
  • When UIControlEventValueChanged is triggered (when the control is pulled), start refreshing your data.
  • When your data is done refreshing, call endRefreshing on the HKRefreshControl, it will stop the animations and hide the control.

Like UIRefreshControl, you can customize HKRefreshControl:

  • tintColor: sets the tint color of the indicator views and the label (available through the UIAppearance API).
  • attributedTitle: use this property to set a label at the bottom of the control.

Latest podspec

{
    "name": "HKRefreshControl",
    "version": "1.0.0",
    "summary": "A custom refresh control that mimics iOS6's UIRefreshControl behavior but is also available for iOS5.",
    "homepage": "https://github.com/Harmek/HKRefreshControl",
    "screenshots": "https://github.com/Harmek/HKRefreshControl/raw/master/Screenshot.png",
    "authors": {
        "Panos Baroudjian": "[email protected]"
    },
    "license": "MIT",
    "source": {
        "git": "https://github.com/Harmek/HKRefreshControl.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source_files": [
        "HKRefreshControl/HKRefreshControl.{h,m}",
        "HKRefreshControl/UITableViewController+RefreshControl.{h,m}"
    ],
    "requires_arc": true,
    "dependencies": {
        "HKCircularProgressView": [
            "~> 1.0.5"
        ]
    }
}

Pin It on Pinterest

Share This