I have a new project where I want to display a People Picker, when a button is touched.
So I have a UIButton that segues to a generic UIViewContro
Besi's answer is great. But it's less code to just use the old way instead of using a storyboard for it:
- (void)showPeoplePicker:(id)sender
{
ABPeoplePickerNavigationController* picker = [[ABPeoplePickerNavigationController alloc] init];
picker.peoplePickerDelegate = self;
picker.modalPresentationStyle = UIModalPresentationFullScreen;
picker.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentViewController:picker
animated:YES
completion:^{
// animation to show view controller has completed.
}];
}