Hello,
i am trying to delete cell on tableview with sliding finger (like on the recent call)
i know i need to implement
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
NSArray *index = [[NSArray alloc]initWithObjects:indexPath];
[self.tableView deleteRowsAtIndexPaths:index withRowAnimation: UITableViewRowAnimationNone];
}
but when i sliede the finger i got to this function and in the second row i am trying to delete the cell an get error:
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (4) must be equal to the number of rows contained in that section before the update (4), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted).'
can someone help??