I am trying to create custom tiled layout using UICollectionView. It renders perfectly as desired in simulator once I run my app.
But the moment I scroll the view and br
Your layoutAttributesForItemAtIndexPath:
method is not setting any properties of the layoutAttributes
object before returning it. It needs to set frame
(or center
and size
).
So finally managed a workaround!!! dequeue each cell with an unique Cell Identifier in cellForRow:
[self.summaryView registerClass:[BFSSummaryViewCell class] forCellWithReuseIdentifier:[NSString stringWithFormat:@"%@%d",CellIdentifier,indexPath.row]];
UICollectionViewCell *collectionCell = [collectionView dequeueReusableCellWithReuseIdentifier:[NSString stringWithFormat:@"%@%d",CellIdentifier,indexPath.row] forIndexPath:indexPath];
These two lines inside cellForRow worked for me, however with my collection view having around 1000 cells it increases the size of my application considerably. Lets hope apple fixes this bug asap.