I feel like we should be missing the same thing.
In any case, I did this by following these steps.
IBOutlet UIBarButtonItem *editButton;
-(IBAction)editButtonPressed:(id)sender {
[self setEditing:YES animated:YES];
}
- (void)setEditing:(BOOL)editing animated:(BOOL)animate
{
if(self.tableView.isEditing)
{
self.editButton.style = UIBarButtonItemStylePlain;
self.editButton.title = @"Edit";
}
else
{
self.editButton.style = UIBarButtonSystemItemEdit;
self.editButton.title = @"Done";
}
[super setEditing:!self.tableView.isEditing animated:animate];
}
I hooked up editButton to the button that I added to the navigation bar, and this is the action for editButtonPressed IBAction. After that, my setEditing: is called (obviously), and the super call switches the editing state of the table view.
, , , , , , "" "", ( , "" ). , () ..