读取ABSource的名称 [英] Read name of ABSource

查看:173
本文介绍了读取ABSource的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在addressBook框架中读取ABSource的名称。
这可能吗?下面的代码示例留给我null,而currentSource指针有效。

I want to read the name of an ABSource in the addressBook framework. Is this possible? The following code sample leaves me with null, while the currentSource pointer is valid.

        NSString* stringName = (NSString*)ABRecordCopyValue(currentSource, kABSourceNameProperty); 

提前谢谢,
Martin

Thank you in advance, Martin

推荐答案

NSString *sourceTypeName = (NSString *)((CFStringRef)ABRecordCopyValue(source, kABSourceNameProperty));


ABSourceType sourceType = [(NSNumber *)ABRecordCopyValue(currentSource, kABSourceTypeProperty) intValue];

参见 ABSourceType 的值。

这篇关于读取ABSource的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆