You can create a UIBarButton and add it to the UINavigationBar from an ABPeoplePickerNavigationController like this.
peoplePicker.topViewController.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addPerson:)];
-(IBAction)addPerson:(id)sender{
ABNewPersonViewController *view = [[ABNewPersonViewController alloc] init];
view.newPersonViewDelegate = self;
UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:view];
[self.picker presentModalViewController:nc animated:YES];
}
The problem I ran into was that ABPeoplePavlerNavigationController has a cancel button placed in the rightBarButtonItem slot and I had to update the navigation bar to
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
I documented the entire process on my blog with a proven example that should allow you to create a contact style application similar to an iPhone application. Hope this helps.
source
share