NSCollectionViewDiffableDataSource.ItemProvider
A closure that configures and returns an item for a collection view from its diffable data source.
Declaration
typealias ItemProvider = (NSCollectionView, IndexPath, ItemIdentifierType) -> NSCollectionViewItem?Parameters
- collectionView:
The collection view to configure this item for.
- indexPath:
The index path that specifies the location of the item in the collection view.
- itemIdentifier:
The identifier of the data item for this item.
Return Value
A non-nil configured item object. The item provider must return a valid item object to the collection view.