I’m trying to use the UICollectionView‘s performBatchUpdates method to perform a filtering operation (sorta), and inside the block I’m inserting cells, moving cells, and deleting cells. I’m getting some weird results, so I’m wondering if this behavior is actually supported (I’m figuring the indicies are getting all messed up). Do I just need to break each “type” of action (insert, move, and delete) into separate, distinct blocks?
I’m trying to use the UICollectionView ‘s performBatchUpdates method to perform a filtering operation
Share
All operations inside
performBatchUpdatesare performed against the current indices. So no, you shouldn’t have to break up insertions/deletions/movements into different blocks, that’s exactly whatperformBatchUpdatesis for. Without some code or a description of the weirdness you’re seeing it’s hard to help…