For my app, I am trying to detect whether or not a selected person's contact consists of more than 1 phone number. If it only contains 1 number, I want to use
-(void)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker didSelectPerson:(ABRecordRef)person{
[self peoplePickerNavigationController:peoplePicker shouldContinueAfterSelectingPerson:person];
}
-(BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person{
[self dismissViewControllerAnimated:NO completion:nil];
return YES;
}
and get the phone number. However, if it contains more than one, I want to use
-(void)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker didSelectPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier{
}
so that the user can select which phone number to use. However, whenever using the
-(void)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker didSelectPerson:(ABRecordRef)person{
}
after selecting a person, it will always dismiss the view by itself. I tried adding
[self dismissViewControllerAnimated:NO completion:nil];
into the first method but that didn't seem to work either and the view still dismissed itself. How can I prevent the view from dismissing itself or is there another method I should be using?
Best