A view controller that displays an interface for picking contacts.


class CNContactPickerViewController : UIViewController


A CNContactPickerViewController allows the user to select one or more contacts (or their properties) from the list of contacts displayed in the contact view controller (CNContactViewController). The picker supports both single selection and multiselection of the contacts. The app using contact picker view does not need access to the user’s contacts and the user will not be prompted for “grant permission” access. The app has access only to the user’s final selection.

There are predefined predicates in this class that let you control the user selection of the contact. Changing the predicates only take effect before the view is presented.


Displaying Contacts Properties

var displayedPropertyKeys: [String]?

The CNContact property keys to display in the contact detail card.

Responding to User Interactions

var delegate: CNContactPickerDelegate?

The delegate to be notified when the user selects a contact or a property.

protocol CNContactPickerDelegate

The methods that you implement to respond to contact-picker user events.

Predicates For Selecting Contacts

var predicateForEnablingContact: NSPredicate?

A predicate to determine the contact selectability in the list of contacts.

var predicateForSelectionOfContact: NSPredicate?

A predicate to control the return of the selected contact.

var predicateForSelectionOfProperty: NSPredicate?

A predicate to control the properties of the selected contact.

See Also

Contact Pickers

class CNContactPicker

A popover-based interface for selecting a contact.