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

License MIT
Carthage compatible
Pod Version
Pod Platform
Support
Build Status
Coverage Status
Reference Status

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.0.4' 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

__weak typeof(self) weakSelf = self;
[tableView.cm addHeadRefreshWithAnimator: nil handler: ^{
    //DLog(@"Refresh handler");
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        weakSelf.tableView.dataMap = @{
                                       @"1. Day One" : @{
                                               @"1. Normal" : ^(){ DLog(@"Normal, tapped."); },
                                               @"2. Multi lines" : ^(){ DLog(@"Multi, tapped."); },
                                               @"3. Long single line" : ^(){ DLog(@"Long, tapped."); },
                                               @"4. Very long text" : ^(){ DLog(@"Very, tapped."); },
                                               @"5. No message" : ^(){ DLog(@"No, tapped."); }
                                               },
                                       @"2. Day two" : @{
                                               @"1. Normal" : ^(){ DLog(@"Normal, tapped."); },
                                               @"2. Multi lines" : ^(){ DLog(@"Multi, tapped."); },
                                               @"3. Long single line" : ^(){ DLog(@"Long, tapped."); },
                                               @"4. Very long text" : ^(){ DLog(@"Very, tapped."); },
                                               @"5. No message" : ^(){ DLog(@"No, tapped."); }
                                               },
                                       @"3. Day three" : @{
                                               @"1. Normal" : ^(){ DLog(@"Normal, tapped."); },
                                               @"2. Multi lines" : ^(){ DLog(@"Multi, tapped."); },
                                               @"3. Long single line" : ^(){ DLog(@"Long, tapped."); },
                                               @"4. Very long text" : ^(){ DLog(@"Very, tapped."); },
                                               @"5. No message" : ^(){ DLog(@"No, tapped."); }
                                               },
                                       };
        [weakSelf.tableView.cm endHeaderRefresh];
        [weakSelf.tableView.cm resetNoMore];
    });
}];

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.1",
    "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.1"
    },
    "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