Latest 0.1.2
Homepage https://github.com/chucklab/CMRefresh
License MIT
Platforms ios 8.0, requires ARC
Dependencies AHEasing
Frameworks Foundation, UIKit
Authors

CMRefresh

License MIT
Carthage compatible
Pod Version
Platform
Support

Some util refresh categories for UIScrollView and it’s subclasses, which write in Objective-C, wish you love it, enjoy the code:D

CMRefreshDemo_1-w100

Installation

Cocoapods:

  1. Add pod 'CMRefresh', '~> 0.1.1' to your Podfile.
  2. Run pod install or pod update.
  3. Import <CMRefresh.h>.

Carthage:

  1. Add github "chucklab/CMRefresh" to your Cartfile.
  2. Run carthage update --platform ios and add the framework to your project.
  3. Import <CMRefresh/CMRefresh.h>.

Usage

Header

__weak typeof(self) weakSelf = self;
[tableView.cm addHeadRefreshWithAnimator: nil handler: ^{

    // Refresh Handler ...

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [weakSelf.tableView.cm endHeaderRefresh];
        [weakSelf.tableView.cm resetNoMore];
    });
}];

Footer

[tableView.cm addFootRefreshWithAnimator: nil handler: ^{

    // Footer Handler ...

    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        if (newData) {

            // Load new data ...

            [weakSelf.tableView.cm endLoadingMore];

        } else {
            [weakSelf.tableView.cm noticeNoMoreData];
        }
    });
}];

Requirements

This library requires a deployment target of iOS 8.0 or greater.

License

CMRefresh is provided under the MIT license. See LICENSE file for details.

Latest podspec

{
    "name": "CMRefresh",
    "version": "0.1.2",
    "summary": "Some util refresh categories for UIScrollView and it's subclasses.",
    "description": "Some util refresh categories for UIScrollView and it's subclasses, which write in Objective-C, wish you love it, enjoy the code:D",
    "homepage": "https://github.com/chucklab/CMRefresh",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Chuck MA": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/chucklab/CMRefresh.git",
        "tag": "0.1.2"
    },
    "source_files": "Classes/**/*.{h,m}",
    "exclude_files": "Classes/Exclude",
    "public_header_files": "Classes/**/*.h",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "requires_arc": true,
    "dependencies": {
        "AHEasing": [
            "~> 1.2"
        ]
    }
}

Pin It on Pinterest

Share This