If I call -[UICollectionView performBatchUpdates:]
from inside viewWillAppear:
, inside viewDidAppear:
, between these methods, or anytime t
This is expected behaviour and not a bug. From the documentation on performBatchUpdates:
If the collection view's layout is not up to date before you call this method, a reload may occur. To avoid problems, you should update your data model inside the updates block or ensure the layout is updated before you call performBatchUpdates(_:completion:).