landonandrey
landonandrey

Reputation: 1361

UICollectionViewCell side-by-side

I have UICollectionView in my custom keyboard, and it has two rows of cells with same heights, but different widths (size comes from server), direction of scroll is horizontal.

How can I show collection items side by side, without this strange centering which based on the previous cell width?

My result

Upvotes: 2

Views: 79

Answers (1)

landonandrey
landonandrey

Reputation: 1361

I've achivied needed result with SKRaggyCollectionViewLayout

enter image description here P.S. If you'll use SKRaggyCollectionViewLayout, don't forget to put self.layout.variableFrontierHeight = NO; to have same heights for all cells.

Upvotes: 1

Related Questions