I added the SWRevealViewController to my app, along with the hamburger stack to access my menu. My app has a UITableView for the main application view. I want to allow users to delete items from the list using the swipe to delete function.
I enabled the swipe to delete and added a method call to handle this. I noticed that the method never gets called. Not sure how to get this to work.
Any help would be greatly appreciated.
I was asked for a code example. I have not made any changes to the SWRevealViewController standard source code. In my code for the TableView, I have added the following:
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the row from the data source
[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
}
Normally, the code above should show a delete button when you do a right to left swipe. However, this is not happening. My guess is that the SWRevealViewController is eating the pan gesture recognizer.