I've added my edit button
self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemEdit target:self
action:@selector(editNavButtonPressed)] autorelease];
But I don't seem to be able to turn it to Done and back, the console says its Null
-(IBAction)editNavButtonPressed
{
//[self.tableView setEditing:YES animated:YES];
BOOL editing = !self.tableView.editing;
NSLog(@"tile=#%@#", self.navigationItem.rightBarButtonItem.title);
if ([self.navigationItem.rightBarButtonItem.title isEqualToString:NSLocalizedString(@"Edit", @"Edit")]) {
self.navigationItem.rightBarButtonItem.title = NSLocalizedString(@"Done", @"Done");
} else {
self.navigationItem.rightBarButtonItem.title = NSLocalizedString(@"Edit", @"Edit");
}
//self.navigationItem.rightBarButtonItem.enabled = !editing;
//self.navigationItem.rightBarButtonItem.title = (editing) ? NSLocalizedString(@"Done", @"Done") : NSLocalizedString(@"Edit", @"Edit");
[self.tableView setEditing: editing animated: YES];
}