Problem,
with a UIButton, I can do this:
myButton.enabled = YES;
or
myButton.enabled = NO;
However, I can't do the same with a UIBarButtonItem (navigation bar buttons,)
So, how do I stop the user clicking it?
Problem,
with a UIButton, I can do this:
myButton.enabled = YES;
or
myButton.enabled = NO;
However, I can't do the same with a UIBarButtonItem (navigation bar buttons,)
So, how do I stop the user clicking it?
Sure you can; a UIBarButtonItem is a subclass of UIBarItem, which has an enabled property. Just use that.
Just get a reference to the item and do what you have above:
UIBarButtonItem *item = self.navigationItem.rightBarButtonItem;
item.enabled = NO;