I have ios UICollectionView with Flow layout with horizontal scroll direction. In this situation typical header position is on the left side of cells.
I want to make header on the top of section cells
Have you any idea how can I do this?
You need to reduce the height of UICollectionView to its cell / item height and select " Horizontal " from the " Scroll Direction " as seen in the screenshot below. Then it will scroll horizontally depending on the numberOfItems you have returned in its datasource implementation.
Overview. A flow layout is a type of collection view layout. Items in the collection view flow from one row or column (depending on the scrolling direction) to the next, with each row containing as many cells as will fit. Cells can be the same sizes or different sizes.
A layout object determines the placement of cells, supplementary views, and decoration views inside the collection view's bounds and reports that information to the collection view. The collection view then applies the provided layout information to the corresponding views so that they can be presented onscreen.
I solved the problem using DateFlowLayout.
See how I configured it in this other answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With