在现有 UINavigationController 中显示 ABPeoplePickerNavigatorController
我有一个应用程序,其中的弹出窗口中有一个 UINavigationController ,用于显示一些信息。根项目包含一个显示相关联系人的按钮。我想按下联系人按钮并显示 ABPeoplePickerNavigationController
。我有这样的代码来做到这一点:
ABPeoplePickerNavigationController *contactController = [[ABPeoplePickerNavigationController alloc] init];
[self.navigationController pushViewController:contactController animated:YES];
但是,当我按下按钮时,我收到此错误:不支持按下导航控制器。
那么:有没有办法访问 ABPeoplePickerNavigationController
中的视图(使用 topViewController
或 visibleViewController
都给出错误),或者其他方法这样做将不胜感激。
I have an app where I've a UINavigationController
in a popover that displays some information. The root item contains a button showing a related Contact. I'd like to press the contact button and display the ABPeoplePickerNavigationController
. I've got this code to do it:
ABPeoplePickerNavigationController *contactController = [[ABPeoplePickerNavigationController alloc] init];
[self.navigationController pushViewController:contactController animated:YES];
When I push the button, however, I get this error: Pushing a navigation controller is not supported.
So: is there a way to either access the views within the ABPeoplePickerNavigationController
(using topViewController
or visibleViewController
both give an error), or an alternate way to do this would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用它来显示导航控制器。您面临的问题是,您只能在控制器中推送视图,而不能推送整个导航控制器:
您可以使用属性部分,也可以不使用。你还必须实现委托协议。
Use this to show the NavigationController. The problem for you is that you can only push a view in your controller and not a whole navigationController:
U can use the properties part or not. U also have to implement the Delegate protocol.