【问题标题】:RxSwift TableView - How to set numberOfRowsInSection?RxSwift TableView - 如何设置 numberOfRowsInSection?
【发布时间】:2020-04-22 16:56:46
【问题描述】:

使用 RxSwift,是否有与 numberOfRowsInSection 等价的方法?看起来 Rx 会根据数据自动设置行数,但我需要在 tableview 的末尾添加一个与数据无关的额外唯一单元格。由于 tableView 在遍历所有数据后会自动返回,因此我无法设置该单元格。谢谢!

【问题讨论】:

    标签: ios swift rx-swift


    【解决方案1】:

    您应该通过数据进行 UI 操作。无论如何,我建议查看RxDataSourceshttps://github.com/RxSwiftCommunity/RxDataSources

    另外请查看这个问题: RxSwift table view with multiple custom cell types

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多