Skip to content

Instantly share code, notes, and snippets.

@IsaAliev
Created April 10, 2021 13:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IsaAliev/04feeadbd22e0419bb80213d0d94f44d to your computer and use it in GitHub Desktop.
Save IsaAliev/04feeadbd22e0419bb80213d0d94f44d to your computer and use it in GitHub Desktop.
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "id", for: indexPath)
cell.configure...
(cell as? BoundingWidthAdoptable)?.adoptBoundingWidth(collectionView.frame.width)
return cell
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment