翻墙: A better way to update UICollectionView data in Swift with diff framework
performBatchUpdates 要先delete
再insert
Deletes are processed before inserts in batch operations.
This means the indexes for the deletions are processed relative to the indexes of the collection view’s state before the batch operation,
and the indexes for the insertions are processed relative to the indexes of the state after all the deletions in the batch operation.
网友评论