0

is there any best way to listout Property of Contact in detail? like it is working in IOS 6.1 and earlier Version.


//
//  ABPersonViewController.h
//  AddressBookUI
//
//  Copyright (c) 2010 Apple Inc. All rights reserved.
//

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

@interface ABPersonViewController : UIViewController <UIViewControllerRestoration>

// ABPersonViewController does not support subclassing in iOS 7.0 and later. A nil instance will be returned.
4

1 回答 1

0

我找到了解决方案:请参阅源代码

有一些不推荐使用的函数,但我们可以通过替换“ABContactsHelper”类中的以下函数来解决它

+ (ABAddressBookRef) addressBook
{
#ifdef __IPHONE_6_0
    return ABAddressBookCreateWithOptions(NULL, NULL);
#else
    return ABAddressBookCreate();
#endif
}

在调用“ABAddressBookCreate()”的地方使用它。喜欢

ABAddressBookRef addressBook = [ABContactsHelper addressBook];
于 2013-09-24T13:41:44.607 回答