Class

ABMultiValue

The ABMultiValue and ABMutableMultiValue classes are used to represent properties that might have multiple values. Each value in a multivalue list must be of the same type, and must have an associated predefined or user-defined label, and unique identifier. The labels, however, need not be unique. For example, you can have multiple Home phone numbers. Each multivalue object may have a primary identifier—used as a default value when a label is not provided. For example, a person record may have multiple addresses with the labels Home and Work, where Work is designated as the primary value. Instances of this class are immutable, see ABMutableMultiValue for methods that manipulate the content of a multivalue list.

Overview

The ABMultiValue class is “toll-free bridged” with its procedural C opaque-type counterpart. This means that the ABMultiValueRef type is interchangeable in function or method calls with instances of the ABMultiValue class.

Symbols

Accessing the primary identifier

func primaryIdentifier()

Returns the identifier for the primary value.

Accessing identifiers

func identifier(at: Int)

Returns the identifier for the given index.

func index(forIdentifier: String!)

Returns the index for the given identifier.

Accessing entries

func label(at: Int)

Returns the label for the given index.

func value(at: Int)

Returns the value for the given index.

func value(forIdentifier: String!)

Returns the value for the given identifier.

func label(forIdentifier: String!)

Returns the label for the given identifier.

Querying the list

func count()

Returns the number of entries in a multivalue list.

func propertyType()

Returns the type for the values in a multivalue list.