Я реализовал этот удар, чтобы удалить, но как кнопку очистки, которая сбрасывает текстовую метку uitableviewcells, чтобы очистить ... когда этот метод выполняется, он работает отлично ... однако, когда пользователь касается той же ячейки после удара, чтобы очистить, ничего не происходит ... тогда, если вы дотронетесь до него снова, он работает отлично ... вот мой код ..
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the row from the data source
//[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
//reset uitableviewcell textlabel with default input "empty"
vehicleSearchObjectString = @"empty";
[self.tableView reloadData]; //reloads the tabels so you can see the value.
}
else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
}