Latest 0.0.1
Homepage https://github.com/emenegro/pull-to-refresh
License Copyright
Platforms ios 5.0, requires ARC

UPDATE: this project does not have support, instead use the iOS built-in solution since iOS 6, UIRefreshControl.

MNMPullToRefresh is a solution to add pull-to-refresh feature to the top of an UITableView.

This solution has its basis on the Mediator design pattern (http://en.wikipedia.org/wiki/Mediator_pattern). ‘MNMPullToRefreshManager’ acts as a Mediator between the pull-to-refresh view and its container table view, decoupling the view and the scroll management.

In order to maintain this decoupling, there is no ‘UITableView’ subclass, allowing developers to add this behavior as an aggregate of its own subclasses of ‘UITableView’ without creating an intermediate class or adding directly in the UIViewController that manages table delegate and data source.

Installation instructions

1) Copy the whole ‘MNMPullToRefresh’ folder into your project

2) In your UIViewController class, create a ‘MNMPullToRefreshManager’ to link an ‘UITableView’ and the ‘MNMPullToRefreshView’. Use a sentence like this:

   pullToRefreshManager_ = [[MNMPullToRefreshManager alloc] initWithPullToRefreshViewHeight:60.0f 
                                                                                  tableView:table_ 
                                                                                 withClient:self];

3) Implement ‘MNMPullToRefreshManagerClient’ selectors on your UIViewController in order to inform to delegate about the correct offset of the table

4) You can see this usage in ‘ViewController’ classes.

Documentation

1) Execute ‘appledoc appledoc.plist’ in the root of the project path to generate documentation.

Latest podspec

{
    "name": "MNMPullToRefresh",
    "version": "0.0.1",
    "summary": ".",
    "description": "                    Solution to add pull-to-refresh feature at the top of an UITableView.n",
    "homepage": "https://github.com/emenegro/pull-to-refresh",
    "platforms": {
        "ios": "5.0"
    },
    "authors": "Mario Negro",
    "license": "Copyright",
    "requires_arc": true,
    "source": {
        "git": "https://github.com/emenegro/pull-to-refresh.git",
        "commit": "2ddf85d5a42d93df8300f5ee08ea9068a1e677db"
    },
    "source_files": "pull-to-refresh/MNMPullToRefresh/*.{h,m}",
    "resources": "pull-to-refresh/MNMPullToRefresh/*.{png,strings}"
}

Pin It on Pinterest

Share This