简体   繁体   English

具有可编辑的ABPersonViewController的ABPeoplePickerNavigationController

[英]ABPeoplePickerNavigationController with editable ABPersonViewController

I am using an ABPeoplePickerNavigationController to display contacts. 我正在使用ABPeoplePickerNavigationController来显示联系人。 When a user selects a contact that contact's info is displayed in what I'm assuming is a ABPersonViewController - this is the behavior that I want. 当用户选择某个联系人时,该联系人的信息会以我假设为ABPersonViewController的方式显示-这是我想要的行为。 At this point, I would like to be able to edit the contact data by providing an edit button in the righthand side of the ABPeoplePickerNavigationController's navigation bar. 此时,我希望能够通过在ABPeoplePickerNavigationController导航栏的右侧提供一个编辑按钮来编辑联系人数据。 Can this be done? 能做到吗?

I've tried several things including pushing my own ABPersonViewController onto the navigation controller but even with the 'allowsEditing' flag set and the navigation controller's 'rightBarButtonItem' set to an UIBarButtonSystemItemEdit it wouldn't show the edit button? 我已经尝试了几件事,包括将我自己的ABPersonViewController推送到导航控制器上,但是即使设置了“ allowsEditing”标志并且将导航控制器的“ rightBarButtonItem”设置为UIBarButtonSystemItemEdit,它也不会显示编辑按钮?

just set ABPersonViewController 's property allowsEditing and editing YES. 只需设置ABPersonViewController的属性allowsEditingallowsEditing Then you can control the saving action. 然后,您可以控制保存操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM