I am not able to find a way around this. Is it possible to have delete option using left swipe and also using edit and delete.
I have edit button on the left of the navigation bar.
self.navigationItem.leftBarButtonItem = self.editButtonItem;
and commitEditingStyle method as below
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
//delete code here
}
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.
}
}
After using this, the left swipe is not being detected at all. the only way to delete seems to be by going to the edit mode and deleting from there.
help would be appreciated.
I am a newbie so please go easy with me 🙂
you mean swiping on cell you need delete option.
If so you can try this code: