我知道如何从 an 中获取电话号码ABRecordRef
,但我现在想要的是也获取号码的类型,即它的标签作为字符串:
const CFStringRef kABPersonPhoneIPhoneLabel;
const CFStringRef kABPersonPhoneMainLabel;
const CFStringRef kABPersonPhoneHomeFAXLabel;
const CFStringRef kABPersonPhoneWorkFAXLabel;
const CFStringRef kABPersonPhonePagerLabel;
这是我获得数字的方式:
//get all phone numbers
NSArray *phoneNumbersArray = (NSArray*)ABMultiValueCopyArrayOfAllValues(phoneNumberProperty);
NSInteger numbersCounter = 0;
for(numbersCounter = 0; numbersCounter < [phoneNumbersArray count]; numbersCounter++)
{
NSString currentPhoneNumber = [phoneNumbersArray objectAtIndex:indexPhoneNumber];
// here i would like to read the type of phone number
// NSLog(@"NumberType:%@",numberType);
}
我尝试了各种各样的事情,我已经阅读了ABPerson 参考,但我不知道如何获取电话号码类型?