WCSContactPicker
WCSContactPicker copied to clipboard
iOS 9 Contact picker — Apples replacement for the AddressBook framework.
trafficstars
WCSContactPicker
iOS 9 Contact picker — Apples replacement for the AddressBook framework.

Requirements
Requires iOS 9, the ContactsUI.framework and Contacts.framework.
Usage
- Include
WCSContactPickerin your project and import the header file. - Create an instance of
WCSContactPickerand present a navigation controller. - Receive delegate call back with a
Contactobject.
#import "WCSContactPicker.h" @interface ViewController () <WCSContactPickerDelegate> @end WCSContactPicker * _picker = [[WCSContactPicker alloc] initWithDelegate:self]; UINavigationController * controller = [[UINavigationController alloc] initWithRootViewController:_picker]; [self presentViewController:controller animated:YES completion:NULL];
Delegate
Use the delegate callbacks for receive information about authorization, get a generic Contact object or be informed if the user simply cancels Contact selection.
- (void)picker:(WCSContactPicker*)picker didSelectContact:(Contact*)contact;
- (void)picker:(WCSContactPicker*)picker didFailToAccessContacts:(NSError*)error;
- (void)didCancelContactSelection;
Contact Object
This object contains simple to access basic Contact information from CNContact such as the First, Last, Nick, Phones, Email, Urls, etc.
@WrightsCS
Comments and feedback are welcome. Let me know if you contribute, find any bugs, have suggestions, etc. Twitter: @WrightsCS http://www.wrightscsapps.com
Apps using WCSContactPicker
If you are using this in your app, please let me know and I will add your app here!