Skip to content

Instantly share code, notes, and snippets.

@piyushdec
Last active July 31, 2019 22:40
Show Gist options
  • Save piyushdec/df92538346c5311054a7ae35c31e8a2f to your computer and use it in GitHub Desktop.
Save piyushdec/df92538346c5311054a7ae35c31e8a2f to your computer and use it in GitHub Desktop.
collectionView?.performBatchUpdates({
self.collectionView?.deleteItemsAtIndexPaths([NSIndexPath(forRow: 0, inSection: 0), NSIndexPath(forRow: 3, inSection: 0)])
self.collectionView?.reloadItemsAtIndexPaths([NSIndexPath(forRow: 1, inSection: 0), NSIndexPath(forRow: 6, inSection: 0)])
self.collectionView?.insertItemsAtIndexPaths([NSIndexPath(forRow: 5, inSection: 0), NSIndexPath(forRow: 7, inSection: 0)])
self.collectionView?.insertItemsAtIndexPaths([NSIndexPath(forRow: 2, inSection: 0), NSIndexPath(forRow: 4, inSection: 0)])
}, completion: nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment