Latest 0.2.2
Homepage https://github.com/liutongchao/LCRefresh
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, UIKit
Authors

0.2.0 更新动态

1、修复首次下拉刷新会产生table上移问题
2、优化刷新控件,自动管理刷新控件的生命周期,不用再手动释放监听


0.1.16 更新动态

1、修复数据未充满屏幕,上拉刷新问题
2、支持Carthage


0.1.15 更新动态

1、修复了销毁view崩溃bug
注意:在视图将要销毁的时候记得removeobserver


0.1.14 更新动态

1、修复了刷新结束时的动画问题。
2、修复了swift 关于 PI 的警告


使用 LCRefresh 非常方便,只需添加一行代码。

Pod 支持

pod ‘LCRefresh’, ‘~> 0.2.2’

Carthage 支持

github "liutongchao/LCRefresh"

添加下拉刷新 和 上拉加载
    import LCRefresh

    table.refreshHeader = LCRefreshHeader.init(refreshBlock: {
           print("Header 刷新")
            //TODO
     })

    table.refreshFooter = LCRefreshFooter.init(refreshBlock: {
             print("Footer 刷新")
            //TODO
     })
完成刷新
    weak var weakSelf = self
    if weakSelf!.table.isHeaderRefreshing() {
        weakSelf!.table.endHeaderRefreshing()
    }

    if weakSelf!.table.isFooterRefreshing() {
        weakSelf!.table.endFooterRefreshing()
    }
数据加载完毕
    weakSelf!.table.setDataLoadover()

    weakSelf!.table.resetDataLoad()
对象将要销毁时,移除观察者
    table.removeOffsetObserver()
刷新的效果图

HeaderRefresh.png

详细信息请移步到我的博客
Swift 让我来告诉你封装下拉刷新多么简单

–by West

Latest podspec

{
    "name": "LCRefresh",
    "version": "0.2.2",
    "summary": "A Swift refresh tool used on iOS .",
    "description": "It is a Swift refresh tool used on iOS . which implement by Swift",
    "homepage": "https://github.com/liutongchao/LCRefresh",
    "license": "MIT",
    "authors": {
        "liutongchao": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/liutongchao/LCRefresh.git",
        "tag": "0.2.2"
    },
    "source_files": "Source/*.swift",
    "resources": "Source/LCRefresh.bundle",
    "frameworks": [
        "Foundation",
        "UIKit"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This