You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 26, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 26, 2019. It is now read-only.
If I add a button that is removing some section, it is crashing after scrolling to last section:
@IBAction func didClick(sender: AnyObject) {
numberOfSections -= 1;
let set = NSIndexSet(index: 2)
self.collectionView.deleteSections(set)
}
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UICollectionView received layout attributes for a cell with an index path that does not exist: <NSIndexPath: 0xc000000000003116> {length = 2, path = 49 - 0}'
Activity
ostatnicky commentedon Sep 29, 2015
I simulated on my branch: https://github.com/ostatnicky/CustomCollectionViewLayout
ostatnicky commentedon Sep 29, 2015
I added
into
CustomCollectionViewLayoutand call it after deleting section, but it's still crashing when I'm on bottom of collection view.ostatnicky commentedon Sep 30, 2015
Hey, I've niled at start of
prepareLayouttheitemAttributesanditemsSizeand it works now. It is a little hot fix but it works.jkereako commentedon Aug 5, 2016
@ostatnicky UICollectionViewLayout has a delegate method just for what you're doing.