CFDictionarySetValue(_:_:_:)
Sets the value corresponding to a given key.
Declaration
func CFDictionarySetValue(_ theDict: CFMutableDictionary!, _ key: UnsafeRawPointer!, _ value: UnsafeRawPointer!)Parameters
- theDict:
The dictionary to modify. If this parameter is a fixed-capacity dictionary and it is full before this operation, and the key does not exist in the dictionary, the behavior is undefined.
- key:
The key of the value to set in
theDict. If a key which matcheskeyis already present in the dictionary, only the value for the key is changed (“add if absent, replace if present”). If no key matcheskey, the key-value pair is added to the dictionary.If a key-value pair is added, both
keyandvalueare retained by the dictionary, using the retain callback provided whentheDictwas created.keymust be of the type expected by the key retain callback. - value:
The value to add to or replace in
theDict.valueis retained using the value retain callback provided whentheDictwas created, and the previous value if any is released.valuemust be of the type expected by the retain and release callbacks.