6
ABAddressBookRef addressBook = ABAddressBookCreate();
CFArrayRef nameArray = ABAddressBookCopyArrayOfAllPeople (addressBook);
m_SourceContactsUserArray = [[NSMutableArray alloc] init];
for (int i = 0; i<CFArrayGetCount(nameArray); i++) {
ABRecordRef person = CFArrayGetValueAtIndex(nameArray, i);
NSString *personName = (NSString*)ABRecordCopyValue(person,kABPersonFirstNameProperty);
[m_SourceContactsUserArray addObject:personName];
}
CFRelease(addressBook);
CFRelease(nameArray);
請說明是什麼問題? – 2012-04-17 12:18:11