just a suggestion, check if your controller meets these requirements:
I am using a regular UIViewController and it works fine - you need:
- make your controller a delegate of UITableViewDelegate, UITableViewDataSource
- implementation - (void) setEditing: (BOOL) editing animated: (BOOL) animated
- programmatically add an EDIT button - self.navigationItem.rightBarButtonItem = self.editButtonItem (if you add an EDIT button from the builder, you will need to call setEditing: YES manually)
Part of the code :)
- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { return UITableViewCellEditingStyleDelete; } - (void)setEditing:(BOOL)editing animated:(BOOL)animated { [super setEditing:editing animated:animated]; [self.tableView setEditing:editing animated:YES]; } - (void)tableView :(UITableView *)tableView didSelectRowAtIndexPath :(NSIndexPath *)indexPath { [self.tableView deselectRowAtIndexPath:indexPath animated:NO]; [self.navigationController popViewControllerAnimated:YES]; } - (void)viewDidLoad { [super viewDidLoad]; self.navigationItem.rightBarButtonItem = self.editButtonItem; }
Profit!
source share