Reputation: 726
I have 2 navigation bar buttons added and display it at right. I used this code below and works fine.
UIBarButtonItem right = [getUI navBarButtonHistory:self navLink:@selector(btn_sendPreview:) imageNamed:@"ic_print.png"];
UIBarButtonItem rightPending = [getUI navBarButtonHistory:self navLink:@selector(btn_pending:) imageNamed:@"ic_pending.png"];
self.navigationItem.rightBarButtonItems = @[right,rightPending];
but my problem is how to disable that two buttons when i click another button?
Upvotes: 1
Views: 1133
Reputation: 902
In your IBAction method. You disable those two buttons by traversing through right button items.
for(UIBarButtonItem *button in self.navigationItem.rightBarButtonItems) {
button.enabled = NO;
}
Is this what you need?
Upvotes: 2