I'm looking at DiffableDataSource available in iOS13 (or backported here: https://github.com/ra1028/DiffableDataSources) and cannot figure out how one would support multiple cell types in your collection or tableview.
Apple's sample code1 has:
var dataSource: UICollectionViewDiffableDataSource<Section, OutlineItem>! = nil
which seems to force a data source to be a single cell type. If I create a separate data source for another cell type - then there is no guarantee that both data sources don't have apply
called on them at the same time - which would lead to the dreaded NSInternalInconsistencyException
- which is familiar to anyone who has attempted to animate cell insertion/deletion manually with performBatchUpdates
.
Am I missing something obvious?