[英]iOS 8 ABPeoplePickerNavigationController Multiple Selection
I recently upgraded my iPhone and Xcode from iOS 6 to iOS 8 and I experienced the issue of the "default" action being performed when a phone number or email address is selected from the ABPeoplePickerNavigationController
(by "default" action I mean, selecting a phone number starts calling that number and selecting an email address opens up a new email to that address). 我最近将我的iPhone和Xcode从iOS 6升级到iOS 8,我遇到了从ABPeoplePickerNavigationController
选择电话号码或电子邮件地址时执行“默认”操作的问题(通过“默认”操作我的意思是,选择一部手机号码开始呼叫该号码并选择一个电子邮件地址,打开一封到该地址的新电子邮件)。
I implemented the new 我实施了新的
peoplePickerNavigationController:didSelectPerson:property:identifier : peoplePickerNavigationController:didSelectPerson:property:identifier :
method of ABPeoplePickerNavigationControllerDelegate
, which resolved the "default" action issue, but now I am unable to select more than one email address or phone number before the ABPeoplePickerNavigationController
is dismissed, whereas I used to be able to pick any number of email addresses and phone numbers in iOS 6 by returning NO from the ABPeoplePickerNavigationControllerDelegate
方法解决了“默认”操作问题,但现在我无法在ABPeoplePickerNavigationController
被解雇之前选择多个电子邮件地址或电话号码,而我以前可以选择任意数量的电子邮件地址和电话号码在iOS 6中通过从NO返回NO
peoplePickerNavigationController:shouldContinueAfterSelectingPerson:property:identifier: peoplePickerNavigationController:shouldContinueAfterSelectingPerson:属性:标识符:
method which no longer seems to get called. 似乎不再被称为的方法。 I have also tried setting the predicateForSelectionOfProperty
property of the ABPeoplePickerNavigationController
to nil, 我也尝试将ABPeoplePickerNavigationController
的predicateForSelectionOfProperty
属性设置为nil,
[NSPredicate predicateWithValue: YES]
and 和
[NSPredicate predicateWithValue: NO],
but the ABPeoplePickerNavigationController
still dismisses as soon as a property is selected. 但是一旦选择了属性, ABPeoplePickerNavigationController
仍然会解散。
Any idea how to prevent the ABPeoplePickerNavigationController
from dismissing when a property is selected? 知道如何防止ABPeoplePickerNavigationController
在选择属性时解散吗?
Thanks, 谢谢,
Vatche Vatche
Moving the comment as an answer since it proved to be helpful :-) 将评论作为答案移动,因为它被证明是有帮助的:-)
I ended up subclassing ABPeoplePickerNavigationController
and overriding dismissViewControllerAnimated
to be able to decide whether to dismiss it or not, when a property is selected. 我最终dismissViewControllerAnimated
了ABPeoplePickerNavigationController
并重写了dismissViewControllerAnimated
,以便能够在选择属性时决定是否关闭它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.