1

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?

mehdi lotfi
  • 10,204
  • 15
  • 75
  • 123
user2749248
  • 616
  • 7
  • 15
  • write self.navigationItem.rightBarButtonItem = nil; in which you don't want to show it. – Max Jul 28 '14 at 04:05

1 Answers1

2

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?

LongNV
  • 892
  • 9
  • 21