i'm using tableview with two actions, delete and edit. when i swipe to show the action the first one returned in the array of editActionsForRowAtIndexPath: is called automatically
-(NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewRowAction *deleteAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:@"Delete" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath)
{
// delete ...
}];
deleteAction.backgroundColor = [UIColor redColor];
UITableViewRowAction *edit = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:@" Edit " handler:^(UITableViewRowAction *action, NSIndexPath *indexPath)
{
// edit ...
}];
edit.backgroundColor = [UIColor colorWithRed:0x2F/255.0 green:0x83/255.0 blue:0xFB/255.0 alpha:1];
return @[deleteAction,edit];
}
here the delete action is called. I want the actions to show when swipe but not to be called without tapping.