如何使用ABPeoplePicker发送电子邮件? [英] How to get an email using ABPeoplePicker?
本文介绍了如何使用ABPeoplePicker发送电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我没有发现Apple的文档对于实际获取人员选择器的数据非常有帮助,并且互联网上似乎没有太多其他信息:(我假设我需要在此功能中收到电子邮件:
I'm not finding Apple's documentation very helpful for actually getting data with a people picker, and there doesn't seem to be much other information on the internet :( I assume I need to get the email in this function:
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier
{
}
我可以放入什么那里收到所选人的电子邮件?
What can I put in there to get the email of the selected person?
推荐答案
使用
ABMultiValueRef emails = ABRecordCopyValue(record, kABPersonEmailProperty);
之后那么,您可以使用ABMultiValueRefs API方法调用来获取电子邮件地址。
After that, you can use the ABMultiValueRefs API method calls to get email address.
编辑 - 这应该会给你发电子邮件
EDIT -- This should give you email
CFStringRef emailId = ABMultiValueCopyValueAtIndex(emails, identifier);
这篇关于如何使用ABPeoplePicker发送电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文