shokaveli
shokaveli

Reputation: 522

UICollectionView layout with custom layout

Is it possible to create a collection view with an item on the left and two items stacked to the right of it?

Whenever I specify the correct sizes to do this in the sizeForItemAtIndexPath delegate I can only get one item on the right side and the other is displayed in the next row underneath. I know I can do this with custom cells that contain more than one view (top and bottom) but I would like to know if its possible without that. It would be a lot less complex if I could do it without the custom double view cell. Im using a 'flow' layout with 'vertical' scroll direction (as per IB).

First image is what I hope to achieve and the second is what I am able to achieve currently.

What I want to do

Whats happening

Upvotes: 0

Views: 501

Answers (1)

Olga Nesterenko
Olga Nesterenko

Reputation: 1334

You need to implement custom UICollectionViewFlowLayout subclass for this - Creating Custom Layouts

Upvotes: 1

Related Questions