如何使用 ABUnknownPersonViewController 与最初输入的生成数据?
这是一个非常具体的案例。我相信有人已经在某个地方解决了这个问题,但对我来说找到它并不容易。
情况:
1 )一个对象将返回名称地址1、地址2、电话的 NSString
对象:
[anObject name];
[anObject address1];
[anObject address2];
[anObject name];
2)我想使用这些对象来准备带有初始输入值的 ABUnknownPersonViewController
,因此用户在将它们保存到地址簿之前无需输入它们。
我查看了iOS文档并通过Google和StackOverflow进行搜索,无法找到这个简单情况的正确答案。
有人可以指导我吗?
This is very specific case. I believe someone had already solved this somewhere, but it's not easy for me to find it.
The situation:
1 ) an object will return NSString
objects for name address1, address2, phone:
[anObject name];
[anObject address1];
[anObject address2];
[anObject name];
2 ) I would like to use these objects to prepare ABUnknownPersonViewController
with initially entered values, so the user will not have to enter them before saving them in Address Book.
I have looked at iOS documents and searched through Google and StackOverflow, can't find the right answer for this simple situation.
Can anyone guide me on this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到了答案:它在 iOS 开发人员库中有很好的记录:
http://developer.apple.com/library/ios/#samplecode/QuickContacts/Listings/Classes_QuickContactsViewController_m.html#//apple_ref/doc/uid/DTS40009475-Classes_QuickContactsViewController_m-DontLinkElementID_6
这里是我实现的示例代码将 ABPersonRecordRef 作为对象返回。我遇到的错误与返回 ABPersonRecordRef 对象后不保留它有关。
Found an answer: It's nicely documented in iOS Developer Library:
http://developer.apple.com/library/ios/#samplecode/QuickContacts/Listings/Classes_QuickContactsViewController_m.html#//apple_ref/doc/uid/DTS40009475-Classes_QuickContactsViewController_m-DontLinkElementID_6
Here is a sample code I implemented to return a ABPersonRecordRef as an object. The error I had experienced was related to not retaining the ABPersonRecordRef object after returning it.