Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UICollectionView header position in horizontal scroll direction mode with flow layout

Tags:

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?

like image 642
greg_pl Avatar asked Jan 29 '13 09:01

greg_pl


People also ask

How do I make my UICollectionView scroll horizontal?

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.

What is UICollectionView flow layout?

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.

What is collection view layout?

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.


1 Answers

I solved the problem using DateFlowLayout.

See how I configured it in this other answer.

like image 158
Morten Holmgaard Avatar answered Oct 05 '22 09:10

Morten Holmgaard