Serious bug for UICollectionView
Serious bug for UICollectionView
- Subject: Serious bug for UICollectionView
- From: Colas B <email@hidden>
- Date: Fri, 07 Nov 2014 14:49:35 +0000
Dear cocoa-dev,
I am facing the following bug with `UICollectionView` in the **horizontal scrolling mode** (`iOS 8`, `iOS 7`, the only ones I have tested).
I would like to have your views on this bug and on how I could elegantly fix it (and possibly fix it so that when Apple fixes it, my fix won't bring unattended effects). The message is also for reporting the bug to the community. I have already sent a report to Apple.
I set up the collection view manually, and choose a flow layout with an horizontal scrolling.
UICollectionViewFlowLayout * layout = [[UICollectionViewFlowLayout alloc] init] ;
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal ;
layout.minimumInteritemSpacing = 5 ;
layout.minimumLineSpacing = 100 ;
The bug happens when the cells in the UICollectionView does not have the same sizes.
--> when all the cells have the same size,
• minimumInteritemSpacing is for the vertical space between cells
• minimumLineSpacing is for the horizontal space
--> BUT as soon as one of the cells have a different size, the roles are interchanged:
• minimumInteritemSpacing is for the horizontal space between cells
• minimumLineSpacing is for the vertical space.
## Link to a minimal non-working example
https://github.com/colasjojo/TEST_COLLECTION_VIEW_BUG
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden