Hi, is it possible to remove a cell from UITableView directly, with animation? Without changing datasource and then reloading table data?
Thanks.
Hi, is it possible to remove a cell from UITableView directly, with animation? Without changing datasource and then reloading table data?
Thanks.
Not sure what you mean here by "changing the datasource" because removing a row is as simple as deleting an object from the array that's populating the table (the array your datasource is using), then reloading the table.
No animation, no datasource swap.
In UITableView you have the method:
(void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation;
There's a similar method to remove a section.
However, you had better have your data model updated just before you call or else scrolling the table may yield odd results!