iPhone调出地址簿联系人
我在访问给定 ABReferenceID 的 iPhone 地址簿时遇到一些问题。
该方法被正确调用(accessoryButtonTappedForRowWithIndexPath),所有#import的东西都很好(因为我可以毫无问题地保存数据)。
我有一个联系人,ReferenceID = 69273024,我只是想把他带上来。
我尝试使用以下技术来做到这一点,但第 2 行是错误的。我不知道如何正确地将数字整合到问题中。有什么建议吗?
ABPersonViewController *pvc = [[ABPersonViewController alloc] init];
pvc.displayedPerson = 69273024;
[[self navigationController] pushViewController:pvc animated:YES];
问候,挪威本。
I am having some trouble accessing the iphone addressbook given a ABReferenceID.
The method is being called correctly (accessoryButtonTappedForRowWithIndexPath), all the #import stuff is fine (as I can save the data no problem).
I have a contact with ReferenceID = 69273024, I simply want to bring 'him up.
I am trying to do this with the following technique, but line 2 is wrong. I can't work out how to correctly integrate the number into the problem. Any tips?
ABPersonViewController *pvc = [[ABPersonViewController alloc] init];
pvc.displayedPerson = 69273024;
[[self navigationController] pushViewController:pvc animated:YES];
Regards, norskben.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
displayedPerson
属性应设置为 ABRecordRef。您可以使用 ABAddressBookGetPersonWithRecordID。您可以使用 ABAddressBookCreate。更新
这是示例代码,但我还没有测试过:
The
displayedPerson
property should be set to an ABRecordRef. You can get the ABRecordRef from the ABRecordID using ABAddressBookGetPersonWithRecordID. You can get the ABAddressBookRef using ABAddressBookCreate.UPDATE
Here is example code, but I haven't tested it: