85
GitHub - GesanTung/GTRefresh: 下拉刷新组件
source link: https://github.com/GesanTung/GTRefresh?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
CMKRefresh
Swift实现轻量级的下拉刷新上拉加载更多组件,简单易用,支持UIScrollView、UITableView、UICollectionView、UIWebView,支持自定义加载动画
pod 'CMKRefresh'
1 默认下拉刷新
mutable.addHeaderRefresh { [weak self] in
self?.mutable.reloadData()
DispatchQueue.main.asyncAfter(deadline: .now() + 3.0) {
self?.mutable.stopHeaderRefresh()
}
}
//开始刷新
mutable.startHeaderRefresh()
2 默认加载更多
//默认自带效果
mutable.addHeaderRefresh { [weak self] in
self?.mutable.reloadData()
DispatchQueue.main.asyncAfter(deadline: .now() + 3.0) {
self?.mutable.stopHeaderRefresh()
}
}
3 自定义动画加载更多
mutable.addFooterRefresh(custom:CMRefreshFMAnimationFooter()) { [weak self] in
DispatchQueue.main.asyncAfter(deadline: .now() + 3.0) {
self?.mutable.stopFooterRefresh(noMore: true)
self?.count = 40
self?.mutable.reloadData()
}
}
Communication
Email : [email protected] 公众号 :iostips QQ : 603482184
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK