Class

CNLabeledValue

An immutable object that combines a contact property value with a label that describes that property.

Declaration

@interface CNLabeledValue<__covariant ValueType> : NSObject

Overview

Labels describe the context for a given property. For example, the label for a phone number indicates whether it corresponds to the user's home, work, or iPhone number.

CNLabeledValue objects are thread-safe, and you may access their properties from any thread of your app.

Topics

Creating a Labeled Value

- initWithLabel:value:

Returns a new labeled value identifier initialized with the specified label and value.

+ labeledValueWithLabel:value:

Returns a new labeled value identifier object with the specified label and value.

Getting the Label and Value

label

The label for a contact property value.

value

A contact property value.

Setting Labels and Values

- labeledValueBySettingLabel:

Returns a labeled value object with an existing value and identifier.

- labeledValueBySettingLabel:value:

Returns a labeled value object with the specified label and value with the existing identifier.

- labeledValueBySettingValue:

Returns a new value for an existing label and identifier.

Localizing the Label and Value

+ localizedStringForLabel:

Returns a localized string for the specified label.

Getting the Unique Identifier

identifier

A unique identifier for the labeled value object.

Getting Common Labels

CNLabelHome

The label for identifying home information.

CNLabelWork

The label for identifying work information.

CNLabelOther

The label for identifying other information.

CNLabelEmailiCloud

The label for identifying the contact's iCloud email information.

CNLabelURLAddressHomePage

The label for identifying URL information.

CNLabelDateAnniversary

The label for identifying the contact's anniversary date.

Getting Phone Number Labels

CNLabelPhoneNumberMain

The label for identifying the contact's main phone number.

CNLabelPhoneNumberiPhone

The label for identifying the contact's iPhone number.

CNLabelPhoneNumberMobile

The label for identifying the contact's mobile phone number.

CNLabelPhoneNumberPager

The label for identifying the contact's pager phone number.

CNLabelPhoneNumberWorkFax

The label for identifying the contact's work fax phone number.

CNLabelPhoneNumberHomeFax

The label for identifying the contact's home fax phone number.

CNLabelPhoneNumberOtherFax

The label for identifying another fax phone number.

Getting Relationship Labels

CNLabelContactRelationSpouse

The label for the contact's spouse.

CNLabelContactRelationPartner

The label for the contact's partner.

CNLabelContactRelationDaughter

The label for the contact's daughter.

CNLabelContactRelationSon

The label for the contact's son.

CNLabelContactRelationChild

The label for the contact's child.

CNLabelContactRelationParent

The label for the contact's parent.

CNLabelContactRelationFather

The label for the contact's father.

CNLabelContactRelationMother

The label for the contact's mother.

CNLabelContactRelationSister

The label for the contact's sister.

CNLabelContactRelationBrother

The label for the contact's brother.

CNLabelContactRelationFriend

The label for the contact's friend.

CNLabelContactRelationManager

The label for the contact's manager.

CNLabelContactRelationAssistant

The label for the contact's assistant.

Relationships

Inherits From

See Also

Generic Types

CNContactProperty

An object that represents a property of a contact.