I have a view controller with a table view and a NSArray that represent my model. In viewDidLoad I fill the array with objects and then I call [tableView reloadData] to fill the table view. The result is that the table view get filled in one chunk, and I don't like it.
I want it to slide down, like I was adding one cell after a nother.
Is this possible?
If I try to do something like this:
[self.tableView beginUpdates];
for (int i=0; i < sortedPersons.count; i++) {
Person *personInfo = [sortedPersons objectAtIndex:i];
[self.myMainModelArr addObject:personInfo];
NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:i inSection:0];
[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationFade];
}
[self.tableView endUpdates];
I get Invalid table view update error