how can I access the label of phone number in AddressBook

白昼怎懂夜的黑 提交于 2019-12-23 05:29:47

问题


I am using following code

ABMultiValueRef multi = ABRecordCopyValue(i1, kABPersonPhoneProperty);
if(ABMultiValueGetCount(multi)>0){
    NSString *no= (NSString*)ABMultiValueCopyValueAtIndex(multi, 0);
    alarmData.no1=no;
}

This returns the phone number on particular location,but how can I access the label on that location i.e

home 4564645645646


回答1:


I found the answers using follwing code

ABMultiValueRef multi = ABRecordCopyValue(i1, kABPersonPhoneProperty); 
if(ABMultiValueGetCount(multi)>0){ 
    NSString no= (NSString)ABMultiValueCopyLabelAtIndex(multi, 0);
    alarmData.no1=no;
}


来源:https://stackoverflow.com/questions/4720880/how-can-i-access-the-label-of-phone-number-in-addressbook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!