Created
September 25, 2020 07:08
-
-
Save BasThomas/4d3007638ab3deab8c1b11cff5eea5ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let registration = UICollectionView.CellRegistration<CardCollectionViewCell, Card> { cell, indexPath, card in | |
cell.card = card | |
} | |
let dataSource = UICollectionViewDiffableDataSource<Column, Card>( | |
collectionView: collectionView | |
) { collectionView, indexPath, card -> UICollectionViewCell in | |
collectionView.dequeueConfiguredReusableCell( | |
using: registration, | |
for: indexPath, | |
item: card | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment