获取特定联系人的地址簿组

时间:2011-11-22 11:02:18

标签: iphone objective-c ios ipad addressbook

在我的应用程序中,我收到这样的联系人..

ABAddressBookRef addressBook = ABAddressBookCreate();
CFArrayRef allPeople = ABAddressBookCopyArrayOfAllPeople(addressBook);
CFIndex nPeople = ABAddressBookGetPersonCount(addressBook);
for( int i=0;i< nPeople;i++)
{
        ABRecordRef ref = CFArrayGetValueAtIndex(allPeople, i);
        CFStringRef firstName = ABRecordCopyValue(ref, kABPersonFirstNameProperty);
        .....
        and so on
}

任何人都可以建议我如何获得nPeople的小组。

1 个答案:

答案 0 :(得分:0)