UICollectionViewFlowLayout mispositioning cells
| Originator: | amorya | ||
| Number: | rdar://12580808 | Date Originated: | |
| Status: | Resolved: | ||
| Product: | iPhone SDK | Product Version: | 6.0 |
| Classification: | Other Bug | Reproducible: | Sometimes |
I believe this radar is the same issue as rdar://12433891, although it's affecting me in horizontal scrolling mode. I have set up my layout like so: [flowLayout setScrollDirection:UICollectionViewScrollDirectionHorizontal]; [flowLayout setMinimumInteritemSpacing:90.0]; [flowLayout setMinimumLineSpacing:40.0]; flowLayout.itemSize = CGSizeMake(194, 250); CGFloat sideInset = (self.mainContainerView.bounds.size.width - flowLayout.itemSize.width) / 2.0 + 1.0; flowLayout.sectionInset = UIEdgeInsetsMake(0, sideInset, 0, sideInset); The collection view itself is about 400 points tall, and thus should only display one item vertically, and I'd expect the items to be vertically centred. This is happening for the most part. HOWEVER, sometimes when I add a new item (whether I do so by insertItems… or by doing reloadData), it appears immediately below one of the existing ones, half off the screen. In such a situation, if I scroll the collection view a little bit, it notices and the item jumps to its correct position.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!