2

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

landonandrey
  • 1,271
  • 1
  • 16
  • 26
  • As such there is no centering of cell by default Flow layout tries to place the cell within the row if its possible using the minItemSpace attribute. Play with FlowLayout little more it will work for you easily. – Anshul Dec 21 '15 at 10:45

1 Answers1

1

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.

landonandrey
  • 1,271
  • 1
  • 16
  • 26