Latest 0.1.1
Homepage https://github.com/FCXPods/FCXRefresh
License MIT
Platforms ios 6.0, requires ARC
Authors

常用的上下拉刷新功能都支持可自定义,只需简单的两三行代码即可完成,主要支持以下功能:

  • 普通上下拉刷新
  • 自动上下拉刷新
  • 上拉无更多数据控制
  • 上下拉百分比显示
  • 自定义上下拉动画

如何导入

  • 1.手动导入
    把FCXRefresh文件夹导入即可
  • 2.使用CocoaPods
    pod 'FCXRefresh'

如何使用

包含头文件

#import "UIScrollView+FCXRefresh.h"

添加上下拉刷新

//下拉刷新
_refreshHeaderView = [self.tableView addHeaderWithRefreshHandler:^(FCXRefreshBaseView *refreshView) {
[weakSelf refreshAction];
}];

//上拉加载更多
_refreshFooterView = [self.tableView addFooterWithRefreshHandler:^(FCXRefreshBaseView *refreshView) {
[weakSelf loadMoreAction];
}];

自动上下拉刷新设置

[_refreshHeaderView autoRefresh];
_refreshFooterView.autoLoadMore = YES;

上下拉百分比显示

_refreshHeaderView.pullingPercentHandler = ^(CGFloat pullingPercent) {
    headerPercentLabel.text = [NSString stringWithFormat:@"%.2f%%", pullingPercent * 100];
};

_refreshFooterView.pullingPercentHandler = ^(CGFloat pullingPercent) {
    footerPercentLabel.text = [NSString stringWithFormat:@"%.2f%%", pullingPercent * 100];
};

显示效果:

Latest podspec

{
    "name": "FCXRefresh",
    "version": "0.1.1",
    "summary": "u4e0au4e0bu62c9u5237u65b0.",
    "description": "u63d0u4f9bu7b80u4fbfu7684u4e0au4e0bu62c9u5237u65b0uff0cu652fu6301u81eau5b9au4e49uff0cu53eau9700u7b80u5355u7684u4e24u4e09u884cu4ee3u7801u5373u53ef.",
    "homepage": "https://github.com/FCXPods/FCXRefresh",
    "license": "MIT",
    "authors": {
        "fengchuanxiang": "[email protected]"
    },
    "platforms": {
        "ios": "6.0"
    },
    "source": {
        "git": "https://github.com/FCXPods/FCXRefresh.git",
        "tag": "0.1.1"
    },
    "source_files": "FCXRefresh/",
    "resources": "FCXRefresh/*.png",
    "requires_arc": true
}

Pin It on Pinterest

Share This