Skip to content

Instantly share code, notes, and snippets.

@escoz
Created September 14, 2011 15:09
Show Gist options
  • Save escoz/1216828 to your computer and use it in GitHub Desktop.
Save escoz/1216828 to your computer and use it in GitHub Desktop.
Damn button.
- (void)viewDidLoad {
[super viewDidLoad];
UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(onSave)];
item.enabled = NO;
NSLog(@"%@", item); // OBJ is NOT nil here.
self.navigationItem.rightBarButtonItem = item;
}
// the button appears enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment