ABMultiValueInsert(_:_:_:_:_:)
Inserts a value and its label at the given index in amulti-value list.
Declaration
func ABMultiValueInsert(_ multiValue: ABMutableMultiValueRef!, _ value: CFTypeRef!, _ label: CFString!, _ index: CFIndex, _ outIdentifier: UnsafeMutablePointer<Unmanaged<CFString>?>!) -> BoolParameters
- multiValue:
The multi-value list you wish to modify.
- value:
An object representing a value in a multi-value list–it must be of the correct type. For example, if
multiValueis the value for a property of type kABMultiStringProperty, thenvalueneeds to be a CFString object. See Property Types for a list of supported types in a multi-value list(see descriptions of thekABMulti...constants). IfvalueisNULL, this function raises an exception. - label:
The label for
value—it need not be unique. IflabelisNULL, this function raises an exception. - index:
The index to insert
valueat. Ifindexis out of bounds, this function raises an exception. - outIdentifier:
If
valueis added successfully, this parameter returns the new identifier.
Return Value
true ifsuccessfully, false otherwise.
Discussion
This function performs no type checking and will let you adda value whose type does not match the types of the other valuesin the list. However, if you try to use a multi-value list whosevalues are not all of the same type, functions, such as the ABRecord ABRecordSetValue(_:_:_:_:) function,will returns NULL or kABErrorProperty.
See Also
Multi Values
ABMultiValueAdd(_:_:_:_:)ABMultiValueCopyIdentifierAtIndex(_:_:)ABMultiValueCopyLabelAtIndex(_:_:)ABMultiValueCopyPrimaryIdentifier(_:)ABMultiValueCopyValueAtIndex(_:_:)ABMultiValueCount(_:)ABMultiValueCreate()ABMultiValueCreateCopy(_:)ABMultiValueCreateMutable(_:)ABMultiValueCreateMutableCopy(_:)ABMultiValueIndexForIdentifier(_:_:)ABMultiValuePropertyType(_:)ABMultiValueRemove(_:_:)ABMultiValueReplaceLabel(_:_:_:)ABMultiValueReplaceValue(_:_:_:)