Reputation: 883
So I was playing around my UITableView
when I noticed that this code:
[self performBatchUpdates:^{
[self reloadData];
} completion:^(BOOL finished) {}];
does not lead to cellForItemAtIndexPath:
being called, only sizeForItemAtIndexPath
of UICollectionViewFlowLayout
is called.
Does anybody have any idea why this is happening?
I know exactly what happens in reloadData
but this is different from that.
Upvotes: 3
Views: 2259
Reputation: 4368
From the docs of reloadData
: "It should not be called in the methods that insert or delete rows, especially within an animation block implemented with calls to beginUpdates and endUpdates." Perhaps this also applies to performBatchUpdates
.
Upvotes: 2