benuuu
benuuu

Reputation: 761

How can I get UICollectionViewFlowLayout to have an cell span multiple rows?

I am trying to get UICollectionViewFlowLayout to behave similar to the css style float:left.

Basically I want an item that has about twice the height of another item to span multiple rows.

Can I do this easily with UICollectionViewFlowLayout or do I need to create my own layout?

What I want:

This is what I want

What I have:

enter image description here

Upvotes: 1

Views: 398

Answers (1)

Zev Eisenberg
Zev Eisenberg

Reputation: 8158

You can do it with a horizontally scrolling layout, since that will lay out your cells in columns instead of rows. The only problem is, then you have to scroll horizontally instead of vertically. If that is not an option, I’m pretty sure you’ll need to do a custom layout.

Upvotes: 1

Related Questions