Dan Barber Dan Barber - 8 months ago 38
iOS Question

Row animation occurs when specifying UITableViewRowAnimationNone for UITableView

Slow animation simulator testing for my iOS app shows that the first row of my table view is always animated, regardless of how I specify animation for the row.

int insertIdx = 0;
[_allEntries insertObject:entry atIndex:insertIdx];
[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:insertIdx inSection:0]]

How can I disable all row animation for a tableview? This happens with iOS 6.1 and 5.1.


For the first row, you can use [self.tableView reloadData] instead of insertRowsAtIndexPaths (you can also use reloadData for all the other rows, but insertRowsAtIndexPaths is more efficient).