在 iPhone 中编辑联系人时禁用添加字段选项
我有一个关于 AddressBookUI
ABPersonViewController *personController=[[ABPersonViewController alloc] init]; 的疑问 ABAddressBookRef 地址簿=ABAddressBookCreate(); //ABRecordRef aRecord=ABAddressBookGetPersonWithRecordID(addressBook, 25);
personController.displayedPerson=ABAddressBookGetPersonWithRecordID(addressBook, uniqueID);
personController.addressBook=addressBook;
personController.personViewDelegate=self;
personController.allowsEditing=YES;
[[self navigationController] pushViewController:personController animated:YES];
[personController release];
显示与 uniqueID 相对应的 cotacts
,但是当视图出现并且我按编辑按钮
添加字段选项出现时,我想隐藏此选项。
这可以吗???? 如果是,请建议我一些解决方法。
提前谢谢。
I have a query regarding AddressBookUI
ABPersonViewController *personController=[[ABPersonViewController alloc] init];
ABAddressBookRef addressBook=ABAddressBookCreate();
//ABRecordRef aRecord=ABAddressBookGetPersonWithRecordID(addressBook, 25);
personController.displayedPerson=ABAddressBookGetPersonWithRecordID(addressBook, uniqueID);
personController.addressBook=addressBook;
personController.personViewDelegate=self;
personController.allowsEditing=YES;
[[self navigationController] pushViewController:personController animated:YES];
[personController release];
to show cotacts corresponding to a uniqueID
but when the view appears and I press the edit button
add fields option Appear, I want to hide this option.
Can this be done?????
If yes kindly suggest me some work around.
Thnx in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这就是标准编辑联系人视图的工作原理。
您可以编写自己的视图和控制器来读取联系人值,将它们放入输入字段中,并在用户编辑它们后保存联系人。但这是相当大量的工作,我建议您无论如何都使用标准视图。
我认为,最好尽可能使用标准 GUI 元素。
That is how the standard Edit Contact view works.
You could write your own view&controller that reads the contacts values, puts them in input fields, and after the user has edited them, saves the contact. But that is quite a lot of work, and I would recomment that you use the standard View anyway.
In my opinion, it is better to use standard GUI elements as much as possible.