Latest 0.0.5
Homepage https://github.com/crash-wu/CSRefresher
License MIT
Platforms ios 8.0, requires ARC
Authors

pull to refresh UITableView/UICollectView

CSRefresher

  • An easy way to use pull-to-refresh

Support what kinds of control to refresh

  • UITableView ,UICollectView

Install

  Install cocoapod 'CSRefresher'
  * Manual import :
   * Drag all file in the CSRefresher folder to project

How to use CSRefresher

The drop-down refresh

//UITableView 添加下拉刷新功能

tableView?.dropDownToRefresh({ () in

  dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(5 * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { [weak self] in
 //结束刷新
   self?.tableView?.header?.endRefreshing()
 }
})

//添加提示文本
tableView?.headerPullToRefreshText = "下拉刷新"
tableView?.headerReleaseToRefreshText = "松开马上刷新"
tableView?.headerRefreshingText = "正在加载..."

Example

(下拉刷新)

The pull-up refresh

    tableView?.pullUpToRefresh ({ (_) in

        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(5 * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) { [weak self] in

            self?.tableView?.footer?.endRefreshing()
        }
    })
    tableView?.footerPullToRefreshText = "上拉加载更多"
    tableView?.footerReleaseToRefreshText = "重开马上加载"
    tableView?.footerRefreshingText = "正在加载..."

Example

(上拉加载更多)

Latest podspec

{
    "name": "CSRefresher",
    "version": "0.0.5",
    "summary": "An easy way to use pull-to-refresh.",
    "description": "An easy way to use pull-to-refresh.And support UITableView ,UICollectionView to refresh",
    "homepage": "https://github.com/crash-wu/CSRefresher",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "crash_wu": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/crash-wu/CSRefresher.git",
        "tag": "0.0.5"
    },
    "source_files": "CSRefresh/CSRefresh/*.swift",
    "resources": "CSRefresh/CSRefresh/Image/*.png",
    "requires_arc": true
}

Pin It on Pinterest

Share This