ABPeoplePicker 呼叫所选号码
我正在使用人员选择器,以便用户可以从联系人中选择电话号码以在应用程序中使用。
当用户单击该号码时,电话应用程序将打开并呼叫该号码......
有什么方法可以阻止这种情况吗?
I'm using the people picker so the user can choose a phone number from their contacts to use in the app.
When the user clicks on the number, the phone app opens and that number is called...
Is there any way to stop this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看看 shouldPerformDefaultActionForPerson:
--EDIT--
上面的方法是针对 ABPersonViewController 的,我误以为是 ABPeoplePicker。 ABPeoplePicker 的逻辑与上面相同,只是您将使用此委托回调:
Take a look at shouldPerformDefaultActionForPerson:
--EDIT--
The above method is for ABPersonViewController which I mistook for ABPeoplePicker. The logic for ABPeoplePicker is the same as above only you would use this delegate call back instead:
我只是忘记在shouldContinueAfterSelectingPerson:方法中返回NO,我不知道你从哪里得到shouldPerformDecaultActionForPerson:,它不是委托方法之一
I just forgot to return NO in the shouldContinueAfterSelectingPerson: method, I don't know where you got shouldPerformDecaultActionForPerson: from, it's not one of the delegation methods