Latest 0.1.9
Homepage https://github.com/ablettchen/ACList
License MIT
Platforms ios 8.0, requires ARC
Dependencies MJRefresh
Authors

CI Status
Version
License
Platform

Example

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


    #import "ACList.h"

    //加载数据
    __weak __typeof(&*self)weakSelf = self;
    [self loadData:^(ACList * _Nonnull list) {

        //1. 列表刷新配置
        list.loadType = ACLoadTypeNew | ACLoadTypeMore;
        list.listView = weakSelf.tableView;
        list.blankDic = @{@(ACBlankTypeFailure) : blankMake([UIImage imageNamed:@"blank_failure"], @"加载失败了", @"404")};
        [list start];

        //2. 请求数据
        //请求参数
        NSDictionary *parameters = @{@"offset"  : @(list.range.location),
                                     @"number"  : @(list.range.length)};
        __strong __typeof(&*self)strongSelf = weakSelf;
        [weakSelf requestDataWithParameters:parameters finished:^(NSError *error, NSArray *datas) {
            //3. 添加数据
            //当前加载状态为下拉刷新时移除旧数据
            if (list.loadStatus == ACLoadStatusNew) [strongSelf.datas removeAllObjects];
            if (datas && datas.count > 0) [strongSelf.datas addObjectsFromArray:datas];
            //4. 刷新
            [list finish:error];
        }];
    }];

Requirements

Installation

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

pod 'ACList'

Author

ablettchen, [email protected]

License

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

Latest podspec

{
    "name": "ACList",
    "version": "0.1.9",
    "summary": "u5febu901fu914du7f6eu4e0bu62c9u5237u65b0u3001u4e0au62c9u52a0u8f7du3001u7a7au767du9875uff0cu9002u7528u4e8e UITableViewu3001UICollectionViewu3001UIScrollView",
    "homepage": "https://github.com/ablettchen/ACList",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ablettchen": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ablettchen/ACList.git",
        "tag": "0.1.9"
    },
    "social_media_url": "https://weibo.com/ablettchen",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "ACList/Classes/**/*",
    "requires_arc": true,
    "dependencies": {
        "MJRefresh": [
            "~> 3.1.15.7"
        ]
    }
}

Pin It on Pinterest

Share This