In this article, we’re going to create a generic and reusable implementation of
UICollectionViewDiffableDataSource in MVVM. Hope you’re excited!
UICollectionViewDiffableDataSource is a declarative API for
UICollectionView data source released by Apple in iOS 13. It sets an alternative to the old U
ICollectionViewDataSource — which provides us with delegate methods to determine the number of sections & cells and cell configuration based on our data set, and methods to remove and insert cells into the collection view. This approach isn’t always safe as things can often go wrong on our side; the data may not always be there at the collection…
Software engineer specializing in iOS development. I love creating and learning.