i have a question about the ABPersonViewController. I use the ABPeoplePickerNavigationControllerDelegate to show the people picker (list of contacts). I want to show a ABPersonViewController when i select a person. The problem is that the ABPersonViewController disapear after selecting the person. In detail -> i select a person -> ABPersonViewController appears (with the correct properties) -> ABPersonViewController dispear immediately and the complete peoplepicker also. I think the problem is that i push the PeoplePicker away.
I read a lot in tutorials but i dont get it. I am currently develop for IOS 8.
Most of the tutorials call the ABPersonViewController in a diffrent method of peoplepicker but if i call it in another delegate method it doesnt work.
Here is my code:
@interface ViewController : UIViewController<ABPeoplePickerNavigationControllerDelegate, ABPersonViewControllerDelegate>
- (BOOL)peoplePickerNavigationController:
(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person {
ABPersonViewController *picker = [[ABPersonViewController alloc] init];
picker.personViewDelegate = self;
picker.displayedPerson = person;
picker.displayedProperties = peoplePicker.displayedProperties;
picker.allowsActions = YES;
[peoplePicker pushViewController:picker animated:YES];
return NO;
}
Thank you in advance.
Greetings