Created
July 26, 2017 15:58
-
-
Save e23z/886ecec03ca4d7e92c04b6fc525304b6 to your computer and use it in GitHub Desktop.
[Animated UITableView Reload] How to animate an UITableView when it reloads its data. #ios #swift #animation #ui
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
UIView.transitionWithView(tableView, | |
duration: 0.35, | |
options: .TransitionCrossDissolve, | |
animations: { () -> Void in | |
self.tableView.reloadData() | |
}, | |
completion: nil); | |
/* | |
possible animations: | |
.TransitionNone | |
.TransitionFlipFromLeft | |
.TransitionFlipFromRight | |
.TransitionCurlUp | |
.TransitionCurlDown | |
.TransitionCrossDissolve | |
.TransitionFlipFromTop | |
.TransitionFlipFromBottom | |
*/ | |
// another alternative should be reloading the sections | |
// [_tableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationFade]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you very much!