iOS MJRefresh的使用 (列表上拉加载更多)


pod 'MJRefresh'

import MJRefresh

 

加载更多

let footView = MJRefreshAutoNormalFooter(refreshingBlock:{
    //去加载数据 加载完数据后状态设置为默认
    self.collection_view.mj_footer?.state = .idle
    //如果加载不到数据可以把状态设置为 noMoreData,就不会在加载数据了
    self.collection_view.mj_footer?.state = .noMoreData
})

collection_view.mj_footer = footView
collection_view.mj_footer.state = .willRefresh //会调用refreshingBlock加载数据

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM