Skip to content

Instantly share code, notes, and snippets.

@artrmz

artrmz/diff_ds.swift

Created Mar 25, 2020
Embed
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
You can’t perform that action at this time.