IOS 8 ABPeoplePickerNavigationController Multiple Choice

I recently upgraded my iPhone and Xcode from iOS 6 to iOS 8 and I ran into an issue with the "default" action being taken when choosing a phone number or email address from ABPeoplePickerNavigationController

(by default "default action" I mean when choosing a number phone starts calling that number and selecting an email address opens a new email to that address).

I have implemented a new

peoplePickerNavigationController: didSelectPerson: Property: id :

method ABPeoplePickerNavigationControllerDelegate

that solved the default action problem, but now I can't select more than one email or phone number before rejecting ABPeoplePickerNavigationController

, whereas I used to choose any number of email addresses and phone numbers in iOS 6, returning NO from

peoplePickerNavigationController: shouldContinueAfterSelectingPerson: Property: identifier:

which is no longer called callable. I also tried to set the property predicateForSelectionOfProperty

value ABPeoplePickerNavigationController

is nil,

[NSPredicate predicateWithValue: YES] 

      

and

[NSPredicate predicateWithValue: NO],

      

but ABPeoplePickerNavigationController

is still rejected once the property is selected.

Any idea how to prevent rejection ABPeoplePickerNavigationController

when selecting a property?

Thank,

Vatche

+3


source to share


1 answer


Moving the comment as an answer, as it turned out to be helpful :-)



I ended up subclassing ABPeoplePickerNavigationController

and redefining dismissViewControllerAnimated

to be able to decide whether to reject it or not when a property is selected.

+2


source







All Articles