Here is my UIBarButton :
[self.navigationItem setLeftBarButtonItem:[[UIBarButtonItem alloc] initWithTitle:@"+ Contact" style:UIBarButtonItemStylePlain target:nil action:@selector(showPicker:)] animated:YES];
Here is the code that it should run:
- (void)showPicker:(id)sender { ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init]; picker.peoplePickerDelegate = self; [self presentModalViewController:picker animated:YES]; [picker release]; }
When I launch the application and click "+ Contact" UIBarButton , nothing happens. No mistakes, nada. I set a breakpoint and it never reaches the method referenced by the selector.
Am I doing something wrong in what I call a selector?
Thanks!
ios objective-c xcode uinavigationcontroller uibarbuttonitem
ArtSabintsev
source share