如何计算通讯录中的联系人总数?

最佳答案

试试这个

#import <AddressBook/AddressBook.h>
// ...

- (int)contactsCount {
    ABAddressBookRef addressBook = ABAddressBookCreate( );
    CFIndex nPeople = ABAddressBookGetPersonCount( addressBook );
    CFRelease( addressBook );
    return (int)nPeople;
}

关于ios - 计算通讯录中的联系人总数-iOS,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10533074/

10-10 16:57