本文介绍了在iPhone中直接在编辑模式下直接打开ABPersonViewController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开发通讯录应用程序.当用户从联系人列表中选择一个用户时,我想使用ABPersonViewController
直接在EDIT模式下打开该记录,而不是单击ABPersonViewController
的ng编辑按钮.我怎样才能做到这一点?谢谢
I am developing address book app. When user selects a user from a contact list , I want to open that record directly in EDIT mode using ABPersonViewController
instead of clickng Edit button of ABPersonViewController
. How can I achieve this? Thanks
推荐答案
在显示视图后只需调用setEditing:
Just call setEditing after the view is displayed:
ABPersonViewController *ab = [[ABPersonViewController alloc] init];
ab.allowsEditing = YES;
// customize as you see fit
[self.navigationController pushViewController:ab animated:YES];
[ab setEditing:YES animated:NO];
我在iPad上的弹出窗口控制器中对此进行了尝试,效果很好.
I tried this on the iPad from within a popover controller and that works fine.
这篇关于在iPhone中直接在编辑模式下直接打开ABPersonViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!