Skip to content

Instantly share code, notes, and snippets.

@SebastianBoldt
Last active March 12, 2020 18:52
Show Gist options
  • Save SebastianBoldt/c50402cd78106a22004619a0ff1112b2 to your computer and use it in GitHub Desktop.
Save SebastianBoldt/c50402cd78106a22004619a0ff1112b2 to your computer and use it in GitHub Desktop.
CellProvider
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