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加载数据

 

相关文章:

  • 2021-08-31
  • 2022-12-23
  • 2021-10-14
  • 2021-11-21
  • 2022-12-23
  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-07
  • 2022-12-23
  • 2022-01-21
  • 2022-12-23
相关资源
相似解决方案