¡@

Home 

2014/10/15 ¤U¤È 10:11:35

iphone Programming Glossary: multiphones

How do you get a persons phone number from the address book?

http://stackoverflow.com/questions/1117575/how-do-you-get-a-persons-phone-number-from-the-address-book

ABPropertyID property identifier ABMultiValueIdentifier identifier if property kABPersonPhoneProperty ABMultiValueRef multiPhones ABRecordCopyValue person kABPersonPhoneProperty for CFIndex i 0 i ABMultiValueGetCount multiPhones i if identifier ABMultiValueGetIdentifierAtIndex.. ABMultiValueRef multiPhones ABRecordCopyValue person kABPersonPhoneProperty for CFIndex i 0 i ABMultiValueGetCount multiPhones i if identifier ABMultiValueGetIdentifierAtIndex multiPhones i CFStringRef phoneNumberRef ABMultiValueCopyValueAtIndex multiPhones.. for CFIndex i 0 i ABMultiValueGetCount multiPhones i if identifier ABMultiValueGetIdentifierAtIndex multiPhones i CFStringRef phoneNumberRef ABMultiValueCopyValueAtIndex multiPhones i CFRelease multiPhones NSString phoneNumber NSString..

Fetch Contacts in iOS 7

http://stackoverflow.com/questions/19027118/fetch-contacts-in-ios-7

imageNamed @ NOIMG.png get Phone Numbers NSMutableArray phoneNumbers NSMutableArray alloc init ABMultiValueRef multiPhones ABRecordCopyValue person kABPersonPhoneProperty for CFIndex i 0 i ABMultiValueGetCount multiPhones i CFStringRef phoneNumberRef.. ABMultiValueRef multiPhones ABRecordCopyValue person kABPersonPhoneProperty for CFIndex i 0 i ABMultiValueGetCount multiPhones i CFStringRef phoneNumberRef ABMultiValueCopyValueAtIndex multiPhones i NSString phoneNumber __bridge NSString phoneNumberRef.. for CFIndex i 0 i ABMultiValueGetCount multiPhones i CFStringRef phoneNumberRef ABMultiValueCopyValueAtIndex multiPhones i NSString phoneNumber __bridge NSString phoneNumberRef phoneNumbers addObject phoneNumber NSLog @ All numbers @ phoneNumbers..