Last active
July 10, 2024 00:17
-
-
Save phongsakornp/4870b46a9ba4208e5ff0 to your computer and use it in GitHub Desktop.
#swift, `Reload CollectionView With Smooth Animation`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reload data with animation. | |
// http://stackoverflow.com/a/15165733 | |
self.collectionView.performBatchUpdates( | |
{ | |
self.collectionView.reloadSections(NSIndexSet(index: 0)) | |
}, completion: { (finished:Bool) -> Void in | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment