iOS Developer Library

Developer

AddressBook Framework Reference ABMutableMultiValue Reference

Options
Deployment Target:

On This Page
Language:

ABMutableMultiValue Reference

The ABMutableMultiValue opaque type (whose objects are known as mutable multivalues) implements a mutable multivalue property—that is, a property whose value set can be modified. This opaque type extends the capabilities of ABMultiValue.

Functions

  • Returns a mutable copy of a multivalue property.

    Declaration

    Swift

    func ABMultiValueCreateMutableCopy(_ multiValue: ABMultiValue!) -> Unmanaged<ABMutableMultiValue>!

    Objective-C

    ABMutableMultiValueRef ABMultiValueCreateMutableCopy ( ABMultiValueRef multiValue );

    Parameters

    multiValue

    The multivalue property being copied.

    Return Value

    A mutable copy of multiValue.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in iOS 2.0 and later.

  • Adds a value and its corresponding label to a multivalue property.

    Declaration

    Swift

    func ABMultiValueAddValueAndLabel(_ multiValue: ABMutableMultiValue!, _ value: AnyObject!, _ label: CFString!, _ outIdentifier: UnsafeMutablePointer<ABMultiValueIdentifier>) -> Bool

    Objective-C

    bool ABMultiValueAddValueAndLabel ( ABMutableMultiValueRef multiValue, CFTypeRef value, CFStringRef label, ABMultiValueIdentifier *outIdentifier );

    Parameters

    multiValue

    The multivalue property to add value and label to.

    value

    The value to add to multiValue.

    label

    The label for value.

    outIdentifier

    The address at which to place the identifier of the added value. Pass NULL to ignore the identifier.

    Return Value

    true when value is added to multiValue successfully, false otherwise.

    Discussion

    This function performs no type checking. It allows the addition of values whose type does not match the type declared for multiValue.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in iOS 2.0 and later.

  • Replaces a value in a multivalue property with another value.

    Declaration

    Swift

    func ABMultiValueReplaceValueAtIndex(_ multiValue: ABMutableMultiValue!, _ value: AnyObject!, _ index: CFIndex) -> Bool

    Objective-C

    bool ABMultiValueReplaceValueAtIndex ( ABMutableMultiValueRef multiValue, CFTypeRef value, CFIndex index );

    Parameters

    multiValue

    The multivalue property containing the value to replace.

    value

    The new value.

    index

    The location, in multiValue, of the value to replace.

    Raises an exception when out of bounds.

    Return Value

    true when successful, false otherwise.

    Discussion

    This function takes an index. If you have an identifier, use the ABMultiValueGetIndexForIdentifier function to get the corresponding index.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in iOS 2.0 and later.

  • Replaces a label in a multivalue property with another label.

    Declaration

    Swift

    func ABMultiValueReplaceLabelAtIndex(_ multiValue: ABMutableMultiValue!, _ label: CFString!, _ index: CFIndex) -> Bool

    Objective-C

    bool ABMultiValueReplaceLabelAtIndex ( ABMutableMultiValueRef multiValue, CFStringRef label, CFIndex index );

    Parameters

    multiValue

    The multivalue property containing the label to replace.

    label

    The new label.

    index

    The location, in multiValue, of the label to replace.

    Raises an exception when out of bounds.

    Return Value

    true when successful, false otherwise.

    Discussion

    This function takes an index. If you have an identifier, use the ABMultiValueGetIndexForIdentifier function to get the corresponding index.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in iOS 2.0 and later.

  • Inserts a value and a label into a multivalue property.

    Declaration

    Swift

    func ABMultiValueInsertValueAndLabelAtIndex(_ multiValue: ABMutableMultiValue!, _ value: AnyObject!, _ label: CFString!, _ index: CFIndex, _ outIdentifier: UnsafeMutablePointer<ABMultiValueIdentifier>) -> Bool

    Objective-C

    bool ABMultiValueInsertValueAndLabelAtIndex ( ABMutableMultiValueRef multiValue, CFTypeRef value, CFStringRef label, CFIndex index, ABMultiValueIdentifier *outIdentifier );

    Parameters

    multiValue

    The multivalue property into which to insert value.

    value

    The value to insert.

    label

    The label to insert.

    index

    The location, in multiValue, at which to insert value and label.

    Raises an exception when out of bounds.

    outIdentifier

    On output, the identifier of the added value.

    Return Value

    true when value and label are inserted successfully into multiValue, false otherwise.

    Discussion

    This function performs no type checking. It allows the insertion of values whose type does not match the type declared for multiValue.

    This function takes an index. If you have an identifier, use the ABMultiValueGetIndexForIdentifier function to get the corresponding index.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in iOS 2.0 and later.

  • Removes a value from a multivalue property.

    Declaration

    Swift

    func ABMultiValueRemoveValueAndLabelAtIndex(_ multiValue: ABMutableMultiValue!, _ index: CFIndex) -> Bool

    Objective-C

    bool ABMultiValueRemoveValueAndLabelAtIndex ( ABMutableMultiValueRef multiValue, CFIndex index );

    Parameters

    multiValue

    The multivalue property from which to remove the value at index.

    index

    The location, in multiValue, of the value being removed.

    Raises an exception when out of bounds.

    Return Value

    true when successful, false otherwise.

    Discussion

    This function takes an index. If you have an identifier, use the ABMultiValueGetIndexForIdentifier function to get the corresponding index.

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in iOS 2.0 and later.

Data Types

  • Reference to a mutable multivalue property.

    Declaration

    Swift

    typealias ABMutableMultiValueRef = ABMutableMultiValue

    Objective-C

    typedef CFTypeRef ABMutableMultiValueRef;

    Import Statement

    Objective-C

    @import AddressBook;

    Swift

    import AddressBook

    Availability

    Available in iOS 2.0 and later.