Sets the value corresponding to a given key.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
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.
The key of the value to set in
the. If a key which matches
keyis already present in the dictionary, only the value for the key is changed ("add if absent, replace if present"). If no key matches
key, the key-value pair is added to the dictionary.
If a key-value pair is added, both
valueare retained by the dictionary, using the retain callback provided when
keymust be of the type expected by the key retain callback.
The value to add to or replace in
valueis retained using the value retain callback provided when
thewas created, and the previous value if any is released.
valuemust be of the type expected by the retain and release callbacks.