Class

ABMutableMultiValue

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 ABMutableMultiValue are mutable, see ABMultiValue for additional methods that access 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

Adding a value

func add(Any!, withLabel: String!)

Adds a value and its label to a multivalue list.

func insert(Any!, withLabel: String!, at: Int)

Inserts a value and its label at the given index in a multivalue list.

Replacing values and labels

func replaceLabel(at: Int, withLabel: String!)

Replaces the label at the given index.

func replace(at: Int, withValue: Any!)

Replaces the value at the given index.

Removing values

func removeAndLabel(at: Int)

Removes the value and label at the given index.

Setting the Primary identifier

func setPrimaryIdentifier(String!)

Sets the primary value to be the value for the given identifier.

Relationships

Inherits From