zrubenst
zrubenst

Reputation: 931

UICollectionView with differently sized cells

A collection view that is 3 cells wide and x cells tall, however randomly spread throughout i'd like a cell that is the size of 2 cells, see the image below

enter image description here

Upvotes: 0

Views: 118

Answers (1)

johnyu
johnyu

Reputation: 2151

This will require a custom subclass of UICollectionViewLayout, which will manage both position and size of the items in the way you want.

Or you can get a layout somebody else already made, for example RFQuiltLayout:

https://github.com/bryceredd/RFQuiltLayout

https://cocoapods.org/pods/RFQuiltLayout

Upvotes: 1

Related Questions