Why don't you try changing the navigationItem.rightbarButtonItem
property ?
1. Set up two buttons, one for edit and one for done
UIBarButtonItem*editButton=[[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStylePlain target:self action:@selector(editAction)];
UIBarButtonItem*doneButton=[[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStylePlain target:self action:@selector(doneAction)];
2. And wherever necessary, in editAction
preferrably change the rightBarButtonItem
like:
self.navigationItem.rightBarButtonItem=doneButton;
And if you need the editButton
back
self.navigationItem.rightBarButtonItem=editButton;