I have subclassed UICollectionViewLayout . So far so good. However, I have a few cells that are wider than the screen, and sometimes they disappear when scrolling. When you scroll a little more, they will magically appear where they should be. I can show you my code, but I think that nothing bad happens with it, since it works in 90% of cases. However, sometimes really large cells disappear (more than twice the size of the screen).
NSMutableArray* attributes = [NSMutableArray array]; for (int section=0; section < [[self collectionView] numberOfSections]; section++) { [attributes addObject:[self layoutAttributesForSupplementaryViewOfKind:UICollectionElementKindSectionHeader atIndexPath:[NSIndexPath indexPathForItem:0 inSection:section]]]; for (int row=0; row < [[self collectionView] numberOfItemsInSection:section]; row++) { NSIndexPath* indexPath = [NSIndexPath indexPathForItem:row inSection:section]; [attributes addObject:[self layoutAttributesForItemAtIndexPath:indexPath]]; } } return attributes;
I also have these messages: the UICollectionView cell disappears and the Large cells in the UICollectionView are deleted while the cell is still displayed. However, the solution is not mentioned. Can someone help me with this? Maybe the problem is on the side of Apple? And if so, is there anything I can do to solve this myself?
source share