Display ABPeoplePickerNavigationController inside UIPopover

I have a UIPopover that has a navigationController stack. From the second view in this stack, I want to display ABPeoplePickerNavigationController modally in popover. It works for me, but when I fire the modalViewController, the source navigation controller for UIPoover is missing in the popover. Is there a way to make this work properly? Code below:

(IBAction)showPicker:(id)sender { ABPeoplePickerNavigationController *picker = [[ABPeoplePickerNavigationController alloc] init]; picker.peoplePickerDelegate = self; picker.modalPresentationStyle = UIModalPresentationCurrentContext; picker.modalInPopover = YES; [self presentModalViewController:picker animated:YES]; // self is the 2nd viewController in the original navigation stack [picker release]; } (void)peoplePickerNavigationControllerDidCancel: (ABPeoplePickerNavigationController *)peoplePicker { [self dismissModalViewControllerAnimated:YES]; } 
+4
source share
1 answer

The problem is resolved as shown below:

 [self.navigationController presentModalViewController:picker animated:YES]; 
0
source

All Articles