我想从iPhone地址簿中选择多个联系人,并在我的应用中保存选定的联系人。然后我必须检索所选联系人的记录。
答案 0 :(得分:6)
答案 1 :(得分:0)
试试这个
ABAddressBookRef addressBook = ABAddressBookCreate( );
CFArrayRef allPeople = ABAddressBookCopyArrayOfAllPeople( addressBook );
CFIndex nPeople = ABAddressBookGetPersonCount( addressBook );
for ( int i = 0; i < nPeople; i++ )
{
ABRecordRef ref = CFArrayGetValueAtIndex( allPeople, i );
...
}