Latest 1.0.2
Homepage https://github.com/lyimin/XMPullToRefresh
License MIT
Platforms ios 8.0, requires ARC
Authors

XMPullToRefresh

swift版的下拉刷新框架

运行环境:Xcode 7.0+ swift 2.0 iOS 9.0以上

XMPullToRefresh

用法

cocoaPods管理


source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'XMPullToRefresh'

一.下拉刷新


self.tableView.headerViewPullToRefresh ({ () -> Void in
  // 下拉刷新时的操作
})

1.进入下拉刷新状态


self.tableView.headerViewBeginRefreshing()

2.结束下拉刷新状态


self.tableView.headerViewStopPullToRefresh()

3.移除下拉刷新控件


self.tableView.removeHeaderView()

二.上拉加载更多


self.tableView.footerViewPullToRefresh ({ () -> Void in
  // 上拉加载更多时的操作
})

1.进入上拉加载更多状态


self.tableView.footerBeginRefreshing()

2.结束上拉加载更多状态


self.tableView.footerEndRefreshing()

3.移除上拉加载更多控件


self.tableView.removeFooterView()

Latest podspec

{
    "name": "XMPullToRefresh",
    "version": "1.0.2",
    "summary": "The easiest way to use pull-to-refresh.",
    "homepage": "https://github.com/lyimin/XMPullToRefresh",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "xiaoming": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/lyimin/XMPullToRefresh.git",
        "tag": "1.0.2"
    },
    "source_files": "XMRefresh/**/*.{h,m,swift}",
    "resources": "XMRefresh/**/*.{png}",
    "requires_arc": true
}

Pin It on Pinterest

Share This