Last active
March 12, 2020 18:52
-
-
Save SebastianBoldt/c50402cd78106a22004619a0ff1112b2 to your computer and use it in GitHub Desktop.
CellProvider
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 cellProvider: (UICollectionView, IndexPath, Item) -> UICollectionViewCell? = { collectionView, indexPath, item in | |
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "Cell", for: indexPath) | |
cell.backgroundColor = item.color | |
return cell | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment