Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 17th, 2012  |  syntax: None  |  size: 0.34 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2. - (void)viewDidLoad {
  3.     [super viewDidLoad];
  4.  
  5.     UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(onSave)];
  6.     item.enabled = NO;
  7.     NSLog(@"%@", item);  // OBJ is NOT nil here.
  8.     self.navigationItem.rightBarButtonItem = item;
  9. }
  10.  
  11. // the button appears enabled.