I'm converting my collection view to new iOS13 UICollectionViewDiffableDataSource... so I need to update cell information on demand.
Here is my code:
let snap = self.diffDataSouce.snapshot
snap?.reloadItems(withIdentifiers: [itemToUpdate]) //reload cell info
self.diffDataSouce.apply(snap, animatingDifferences: true)
But I get Invalid parameter not satisfying: indexPath || ignoreInvalidItems
...why?
My current snap
contains itemToUpdate
and also my array of models...
I think it's because snap.indexOfItemIdentifier(itemToUpdate)
returns not found (NSNotFound)...but that's should be impossible according data model.
Have you some hints?