ios - UICollectionView with only 1 vertical 'column' still flowing into 2 columns -


I have made those who thought that the basic UICollectionView xCode 5, IOS 7, storyboard, autolayout of me funny Getting the result.

I was hoping to create a single "column" - ie, all cells have to stand up, no one Tebldrishy) for Side-by-Side (example:

| 1 |

| 2 |

| 3 |

| 4 |

| 5 |

However, I'm getting 2 columns like this (which I can only see if I scroll horizontally):

| 1 | | 2 |

| 3 | | 4 |

| 5 |

My collection view is the same width as my cells, 1 section, any inset, no header, scroll direction = vertical, layout = flow.

Edit: I cells through the storyboard tried to add 5 and they are right to stand in the same way as I would like, but when the line programmatically is not added ...

EDIT2: I FYI, I can get another UICollectionView which works fine - the only difference is how the 4x4

I'm single column layout?

See implementation - (CGSize) collectionView: Leautः size ForItemAtIndexPath: UICollectionViewDelegateFlowLayout < / Code> of . You can adjust your cells based on the collection view limit. The flow layout is currently taking advantage of the fact that your 2 cells can fit simultaneously, whereas the device is in landscape orientation.

Another way to modify the inset to a section (ie, you - (UIEdgeInsets) collectionView: Layout: insetForSectionAtIndex:

you can see a single column, such as you can pad)

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -