Created
July 3, 2020 12:46
-
-
Save stevencurtis/abbd614726e2200a03cd666032634f15 to your computer and use it in GitHub Desktop.
setupdatasource
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
dataSource = UICollectionViewDiffableDataSource<Section, String>(collectionView: collectionView) { | |
(collectionView: UICollectionView, indexPath: IndexPath, identifier: String) -> UICollectionViewCell? in | |
if indexPath.row % 2 == 0 { | |
return collectionView.dequeueConfiguredReusableCell(using: registrationUICollectionViewListCell, for: indexPath, item: identifier) | |
} else { | |
return collectionView.dequeueConfiguredReusableCell(using: registrationCustomListCell, for: indexPath, item: identifier) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment