init(collectionView:itemProvider:)
Creates a diffable data source with the specified item provider, and connects it to the specified collection view.
Declaration
init(collectionView: NSCollectionView, itemProvider: @escaping NSCollectionViewDiffableDataSourceReferenceItemProvider)Parameters
- collectionView:
The initialized collection view object to connect to the diffable data source.
- itemProvider:
A closure that creates and returns each of the items for the collection view from the data the diffable data source provides.