NSMutableDictionary(Extensions) Category Reference
Declared in | NSDictionary+Extensions.h |
---|
– setValuesForKeysWithDictionary:recursive:
Copies the value assignments from keyedValues
to the dictionary. If recursive
is true
this operation will also be performed on child dictionaries in the tree.
- (void)setValuesForKeysWithDictionary:(nonnull NSDictionary *)keyedValues recursive:(BOOL)recursive
Parameters
keyedValues |
The assignments to copy. |
---|---|
recursive |
Whether or not to recursively follow child dictionaries. |
Discussion
Copies the value assignments from keyedValues
to the dictionary. If recursive
is true
this operation will also be performed on child dictionaries in the tree.
Declared In
NSDictionary+Extensions.h
– transformValuesWithBlock:
Applies the given transformation block on each value.
Nil values returned by transformBlock
result in removal.
- (void)transformValuesWithBlock:(nonnull id __nullable ( ^ ) ( NSString *__nonnull key , id __nonnull value ))transformBlock
Parameters
transformBlock |
The block to execute on each element of the dictionary. Returning |
---|
Discussion
Applies the given transformation block on each value.
Nil values returned by transformBlock
result in removal.
Declared In
NSDictionary+Extensions.h
– transferFromDictionary:withMapping:
Transfer the keys and values from the given dictionary using the given { source key: destination key } mapping.
- (void)transferFromDictionary:(nonnull NSDictionary *)dictionary withMapping:(nonnull NSDictionary *)mapping
Parameters
dictionary |
The dictionary to transfer from. |
---|---|
mapping |
The { source key: destination key } mapping to use. |
Discussion
Transfer the keys and values from the given dictionary using the given { source key: destination key } mapping.
Declared In
NSDictionary+Extensions.h
– popWithKey:
Removes the value for the given key from the dictionary and returns it.
- (nullable id)popWithKey:(nonnull NSString *)key
Parameters
key |
The key to pop the value for. |
---|
Return Value
The value that was popped with the given key.
Discussion
Removes the value for the given key from the dictionary and returns it.
Declared In
NSDictionary+Extensions.h