Skip to content

Instantly share code, notes, and snippets.



Created Mar 25, 2020
What would you like to do?
let dataSource = UICollectionViewDiffableDataSource<Int, UIColor>(collectionView: collectionView) { collectionView, indexPath, item in
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "sampleIdentifier", for: indexPath)
    cell.backgroundColor = item
return cell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment