Reputation: 578
I find calling invalidateLayout in iOS8 to cause crashy behaviour, probably due to the new invalidateLayout with contexts introduced last WWDC. Still, I haven't found an equivalent to invalidating the whole collection view layout.
Say I want it all to happen exactly like iOS7's invalidateLayout. What should be done?
iOS7: [collectionView.collectionViewLayout invalidateLayout];
iOS8: ???
Upvotes: 3
Views: 422
Reputation: 16467
As of iOS 8 you will want to invalidate the layout within a batch update block:
[collectionView performBatchUpdates:^{
[layout invalidateLayout];
} completion:nil];
Upvotes: 3