Class

CNContactFormatter

An object that you use to format contact information before displaying it to the user.

Declaration

@interface CNContactFormatter : NSFormatter

Overview

A CNContactFormatter object 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

Creating a Formatted Attributed String

- attributedStringFromContact:defaultAttributes:

Formats the contact name as an attributed string.

+ attributedStringFromContact:style:defaultAttributes:

Formats the contact name as an attributed string.

Creating a Formatted String

- stringFromContact:

Formats the contact name.

+ stringFromContact:style:

Returns the contact name, formatted with the specified formatter.

Specifying the Formatting Style

style

The formatting style for the contact name.

CNContactFormatterStyle

The formatting styles for contact names.

Getting a Descriptor

+ descriptorForRequiredKeysForStyle:

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

Getting Format Information

+ delimiterForContact:

Returns the delimiter to use between name components.

+ nameOrderForContact:

Returns the display name order.

CNContactDisplayNameOrder

The formatting orders for contact names component.

Relationships

Inherits From

Conforms To

See Also

Formatters

CNPostalAddressFormatter

An object that you use to format a contact's postal addresses.

CNContactVCardSerialization

An object you use to convert to and from a vCard representation of the user's contacts.

CNContactsUserDefaults

An object that defines the default options to use when displaying contacts.