Hello,
So, I've searched around and looked through the class reference, but I cannot find the answer. I'm trying to change a UIBarButtonItem's Identifier, from 'Add' (+) to Undo once selected.
Code:
- (IBAction)addToFav:(id)sender
{
NSLog(@"Add Button Pressed");
addButton.enabled = FALSE;
//addButton.style = UIBarButtonSystemItemUndo;
UIBarButtonItem *newUndoButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemUndo target:self action:@selector(id)];
self.navigationItem.rightBarButtonItem = newUndoButton;
Disabling the button works fine, but what I really want to do is replace it with a Undo button. The above code doesn't work ...
How should I do this?
Thanks in advance -
- sk