Latest 1.0.0
Homepage https://github.com/gltwy/LTRefreshing
License MIT
Platforms ios
Dependencies MJRefresh
Authors

对MJRefresh进行二次封装、简单易扩展

pod search LTRefreshing

target 'LTRefreshingDemo' do
  use_frameworks!
  pod 'LTRefreshing', '~> 1.0.0'
end

Next

__weak typeof(self) weakSelf = self;

//上下拉刷新样式
[LTREFRESH refreshView:self.tableView refreshType:RefreshTypeHeaderAndNormalFooter headerRefreshBlock:^{
    weakSelf.page = 0;
    [weakSelf testHeaderRefresh];
} footerRefreshBlock:^{
    weakSelf.page += 5;
    [weakSelf testFooterRefresh];
}];

/* 只有下拉刷新
[LTREFRESH refreshView:self.tableView refreshType:RefreshTypeHeader headerRefreshBlock:^{
    weakSelf.page = 0;
    [weakSelf testHeaderRefresh];
} footerRefreshBlock:NULL];
 */

/*只有上拉刷新
[LTREFRESH refreshView:self.tableView refreshType:RefreshTypeNormalFooter headerRefreshBlock:NULL footerRefreshBlock:^{
    weakSelf.page += 5;
    [weakSelf testFooterRefresh];
}];
*/

//第一种写法 进入就刷新
HEADER_BEGIN_REFRESH

//第二种写法 进入就刷新
//    [LTREFRESH headerEndRefreshing];

//第一种写法 下拉结束刷新
    HEADER_END_REFRESHING

//第二种写法 下拉结束刷新
// [LTREFRESH headerEndRefreshing];

//第一种写法 上拉结束刷新
FOOTER_END_REFRESHING

//第二种写法 上拉结束刷新
//        [LTREFRESH footerEndRefreshing];

//没有更多数据 上拉结束刷新 没有更多数据
//        FOOTER_END_REFRESHINGWITHNOMOREDATA
//        [LTREFRESH footerEndRefreshingWithNoMoreData];

Latest podspec

{
    "name": "LTRefreshing",
    "version": "1.0.0",
    "summary": "LTRefreshing.",
    "description": "MJLTRefresh second config",
    "homepage": "https://github.com/gltwy/LTRefreshing",
    "license": {
        "type": "MIT",
        "file": "FILE_LICENSE"
    },
    "authors": {
        "gaoliutong": "[email protected]"
    },
    "platforms": {
        "ios": null
    },
    "source": {
        "git": "https://github.com/gltwy/LTRefreshing.git",
        "tag": "1.0.0"
    },
    "source_files": [
        "Classes",
        "Classes/**/*.{h,m}"
    ],
    "exclude_files": "Classes/Exclude",
    "dependencies": {
        "MJRefresh": [
            "~> 3.1.12"
        ]
    }
}

Pin It on Pinterest

Share This