Grouped UITableView row animation quirks
If you remove, add and/or move several rows in a UITableView
at the same time, then you must enclose all these calls with beginUpdates
and endUpdates
. Otherwise the result is undetermined.
For example:
[tableView beginUpdates];
[tableView insertRowsAtIndexPaths:newRows
withAnimation:UITableViewRowAnimationTop];
[tableView deleteRowsAtIndexPaths:invalidRows:
withAnimation:UITableViewRowAnimationTop];
[tableView endUpdates];