To delete a cell at a particular indexpath you may use the following code:
-(void)removeItemAtIndexPath:(NSIndexPath *)indexPath{
[(name of table) beginUpdates];
// I am assuming that you're just using a plain NSMutableArray to drive the data on the table.
// Delete the object from the datasource.
[(name of your array) removeObjectAtIndex:indexPath.row];
// Tell the table what has changed.
[(name of table) deleteRowsAtIndexPaths:@[indexPath]
withRowAnimation:UITableViewRowAnimationRight];
[(name of table)endUpdates];
}
0 Comment(s)