Class

CNContactFormatter

An object that defines the different formatting styles for contacts.

Overview

The CNContactFormatter class handles international ordering and delimiting for the contact name components. When formatting many contacts, create an instance of this class and use the instance methods; otherwise use the class methods.

Topics

Class Methods

class func descriptorForRequiredKeys(for: CNContactFormatterStyle)

Returns the required key descriptor for the specified formatting style of the contact.

class func string(from: CNContact, style: CNContactFormatterStyle)

Returns the contact name, formatted with the specified formatter.

Manual Formatting

class func delimiter(for: CNContact)

Returns the delimiter to use between name components.

class func nameOrder(for: CNContact)

Returns the display name order.

Styling

var style: CNContactFormatterStyle

The formatting style for the contact name.

Constants

enum CNContactFormatterStyle

The formatting styles for contact names.

enum CNContactDisplayNameOrder

The formatting orders for contact names component.

Instance Methods

Relationships

Inherits From

Conforms To