I am having a problem with UICollectionView animations compared to various batch updates. I am using this code:
[collectionView performBatchUpdates:^{ if (touched) { [collectionView deleteItemsAtIndexPaths:markedItems]; [collectionView insertSections:newSec]; } else { [collectionView deleteSections:newSec]; [collectionView insertItemsAtIndexPaths:markedItems]; } } completion:nil];
Here's a video of what I'm trying to do, and problems . The idea is that when you touch an image, it will animate it from above, like a new main image, and disappear with other images. The problem is that when you go back and touch another image, it will animate this new touching image and the previous image.
I believe this is a UICollectionView error and I cannot find a workaround.
Here is a sample project if you want.
source share