LXGRefresh
Swift 开发的弹性下拉刷新组件
需求
- Xcode 7 或更高版本
- iOS 9.0 或更高版本(可能也适用于旧版本,只是未进行测试)
- ARC
- Swift 4.0
需求
打开并运行 Xcode 中的 LXGRefreshExample 项目以查看 LXGRefresh 的实际应用。
安装
cocoapod
平台 :ios, '9.0'
target 'test' do
pod 'LXGRefresh'
end
比
pod install
示例用法
tableView.lxg_addRefreshWithActionHandle(true, headerActionHandle: {
//headeraction
//do your network request
//when the data returns please do
self.tableView.lxg_stopLoading()
}, footerIsOpen: true) {
//footeraction
}
您可以选择两种加载视图类型,您可以使用此方法更改加载类型
tableView.loadingviewType = LXGRrfreshConstants.loadingType.Circle