- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我想知道是否可以提取联系人的家庭电话号码和工作电话号码,而不是他们的家庭传真或工作传真。如果不是,为什么这是一个限制?
引用文献只提到了以下常量:
const ABPropertyID kABPersonPhoneProperty;
const CFStringRef kABPersonPhoneMobileLabel;
const CFStringRef kABPersonPhoneIPhoneLabel;
const CFStringRef kABPersonPhoneMainLabel;
const CFStringRef kABPersonPhoneHomeFAXLabel;
const CFStringRef kABPersonPhoneWorkFAXLabel;
const CFStringRef kABPersonPhoneOtherFAXLabel;
const CFStringRef kABPersonPhonePagerLabel;
但如果您使用 iPhone,您会发现标签比这多得多(更不用说自定义标签了)。我该如何挑选它们?
最佳答案
//contactData is ABRecordRef
ABMultiValueRef phones = ABRecordCopyValue(contactData, kABPersonPhoneProperty);
for (CFIndex i=0; i < ABMultiValueGetCount(phones); i++)
{
NSString* phoneLabel = (NSString*) ABMultiValueCopyLabelAtIndex(phones, i);
NSString* phoneNumber = (NSString*) ABMultiValueCopyValueAtIndex(phones, i);
//for example
if([phoneLabel isEqualToString:(NSString *)kABPersonPhoneMobileLabel])
{
//under phoneNumber you have a kABPersonPhoneMobileLabel value
}
.. add other standard labels
else //custom label
{
}
[phoneNumber release];
[phoneLabel release];
}
CFRelease(phones);
关于ios - ABPerson:如何获得某人的家庭和工作电话(不是传真电话),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21021538/
不要让我开始解释为什么我们必须使用传真,但我们必须这样做。 :( 这就是问题所在。我们使用 Delphi 2010 中的 AsyncPro 传真控件来发送传真。这一切都很好,除了,如果我们在收件人电话
任何人都知道如何使用 Windows 8 Fax true Delphi 发送传真。我的意思是我需要启动带有号码和 pdf 附件的 Windows 传真。有相关教程吗?谢谢。 最佳答案 例如,您可以使
我有一个传真应用程序,我可以使用 API。我一直在尝试将其投入生产。我已经购买了 Office Premium 帐户并放入了新的主线,但没有收到开发团队的任何消息。 此外,关于将应用程序转移到生产环境
我正在使用 Twilio 可编程传真 API 从我的应用程序发送传真消息。当我提供没有任何身份验证的公共(public) URL 作为发送传真的 mediaUrl 时,我在发送传真时不会遇到任何问题。
我有一个传真应用程序,我可以使用 API。我一直在尝试将其投入生产。我已经购买了 Office Premium 帐户并放入了新的主线,但没有收到开发团队的任何消息。 此外,关于将应用程序转移到生产环境
我们有 windows server 2008。每当我们尝试使用 windows 传真和扫描控制台传真 PDF 文档时,adobe reader 实例就会自动打开。如何避免这种情况? 在另一个论坛中给
我想通过 Twilio 仅使用 PHP(如果可能,不使用 JavaScript 或 cron)发送和管理传真来 self 的 linux+Apache+Wordpress 站点。 (开发是在我的本地主
我正在创建一个采用 CCIT4 压缩的 tif 图像。此图像没有 EOFB。有人可以帮助我如何将此 EOFB 添加到 tif 图像中。或者如何使用 EOFB 信息创建图像。 这是我生成没有 EOFB
我以前看过这个问题,但是我没有看到任何明确的答案,而且绝对没有任何答案可以解决我的问题。我创建了一个 Windows 服务来使用 FAXCOMEXLib 库发送传真(半自动)。到目前为止,我的服务已成
我是一名优秀的程序员,十分优秀!