Я добавил этот код в Rootcontroller моего приложения
По какой-то причине метод editStyleForRowAtIndexPath вызывается три раза, когда я проводлю строку ... Я не добавил никакого другого кода только эти 2 метода
- (UITableViewCellEditingStyle) tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{
NSLog(@"Iam being called %d", indexPath.row);
return UITableViewCellEditingStyleDelete;
}
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
//add code here for when you hit delete
}
}