具有多种自定义单元格类型的RxSwift表视图 [英] RxSwift table view with multiple custom cell types
问题描述
当我可以在一个表视图中使用多个自定义单元格时,我想知道是否有RxSwift
的任何代码示例.因此,例如,我有两个部分,第一部分包含10个类型为CellWithImage
标识符的单元格,第二部分具有10个类型为CellWithVideo
标识符的单元格.
I'w wonder is there any code example for RxSwift
when I can use multiple custom cells inside one table view. So for example I have two section and first section has 10 cells with type CellWithImage
identifier and second section has 10 cells with type CellWithVideo
identifier.
我建立的所有tut和代码示例仅使用一种单元格类型,例如RxSwiftTableViewExample
All tuts and code examples which I've founded are using only one cell type, for instance RxSwiftTableViewExample
感谢您的帮助
推荐答案
我已经使用 RxSwiftDataSources ,
它允许您将自定义单元格与多个部分一起使用. 我已将此代码用于帮助
it allow you to use custom cells with multi sections. I've used this code for help
这篇关于具有多种自定义单元格类型的RxSwift表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!