Instance Method

dictionaryWithValuesForKeys:

Returns a dictionary containing the property values identified by each of the keys in a given array.

Declaration

- (NSDictionary<NSString *,id> *)dictionaryWithValuesForKeys:(NSArray<NSString *> *)keys;

Parameters

keys

An array containing NSString objects that identify properties of the receiver.

Return Value

A dictionary containing as keys the property names in keys, with corresponding values being the corresponding property values.

Discussion

The default implementation invokes valueForKey: for each key in keys and substitutes NSNull values in the dictionary for returned nil values.

See Also

Getting Values

- valueForKey:

Returns the value for the property identified by a given key.

- valueForKeyPath:

Returns the value for the derived property identified by a given key path.

- valueForUndefinedKey:

Invoked by valueForKey: when it finds no property corresponding to a given key.

- mutableArrayValueForKey:

Returns a mutable array proxy that provides read-write access to an ordered to-many relationship specified by a given key.

- mutableArrayValueForKeyPath:

Returns a mutable array that provides read-write access to the ordered to-many relationship specified by a given key path.

- mutableSetValueForKey:

Returns a mutable set proxy that provides read-write access to the unordered to-many relationship specified by a given key.

- mutableSetValueForKeyPath:

Returns a mutable set that provides read-write access to the unordered to-many relationship specified by a given key path.

- mutableOrderedSetValueForKey:

Returns a mutable ordered set that provides read-write access to the uniquing ordered to-many relationship specified by a given key.

- mutableOrderedSetValueForKeyPath:

Returns a mutable ordered set that provides read-write access to the uniquing ordered to-many relationship specified by a given key path.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software