UITableView + Core Animation

Solutions Collect From Internet About “UITableView + Core Animation”

You should use the regular UITableView, but custom UITableViewCells.
UITableView‘s support fading and other kind of animations for adding/removing/reloading cells

NSMutableArray *affectedRows = [NSMutableArray array];
[affectedRows addObject:[NSIndexPath indexPathForRow:0 inSection:0]];
[affectedRows addObject:[NSIndexPath indexPathForRow:1 inSection:0]];

// use whatever corresponds
[self.tableView deleteRowsAtIndexPaths:affectedRows withRowAnimation:UITableViewRowAnimationLeft];

[self.tableView insertRowsAtIndexPaths:affectedRows withRowAnimation:UITableViewRowAnimationLeft];

[self.tableView reloadRowsAtIndexPaths:affectedRows withRowAnimation:UITableViewRowAnimationLeft];

Be careful when using these methods, because the numberOfRowsInSection: function gets called again, and if the new result doesn’t match the new number of rows, your app will crash

IE: you have 5 rows, and delete 2, your method must then return 3