开发者

Read name of ABSource

开发者 https://www.devze.com 2023-02-16 20:57 出处:网络
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.

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 = (NS开发者_开发知识库String*)ABRecordCopyValue(currentSource, kABSourceNameProperty); 

Thank you in advance, Martin


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


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

See ABSourceType for values.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号