I'm using a UICollectionView to show several sections of data. These sections have a fixed number of items. I want all the items to show in a continuous grid.
Right now I accomplish this in horizontal orientation:
But in vertical this leaves a big gap:
I want to solve this gap between sections because it's ugly and it doesn't belong there.
I'd be happy to use a custom FlowLayout, but I can't find a tutorial that points me in the right direction (I've found several, but none of them really touch this problem specifically.)
Can anybody help me solve this problem, or at least point me in the right direction?
P.S: I've implemented sections because I'm loading the data on the fly. Using 1 section isn't an option for me at this moment.
UPDATE
On request I'm adding the values used for my current FlowLayout. I'm using the standard Horizontal Flow Layout on a fullscreen (minus UINavigationBar) UICollectionView with 21 items per section.
- Scroll direction: Horizontal
- Cell size: 248, 196
- Header / footer size: none
- Min spacing for cells: 10
- Min spacing for lines: 10
- Section Insets: 20, 20, 10, 10
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…