Instance Method

objectsForKeys:notFoundMarker:

Returns as a static array the set of objects from the dictionary that corresponds to the specified keys.

Declaration

- (NSArray<ObjectType> *)objectsForKeys:(NSArray<KeyType> *)keys notFoundMarker:(ObjectType)marker;

Parameters

keys

An NSArray containing the keys for which to return corresponding values.

anObject

The marker object to place in the corresponding element of the returned array if an object isn’t found in the dictionary to correspond to a given key.

Discussion

The objects in the returned array and the keys array have a one-for-one correspondence, so that the n

the object in the returned array corresponds to the nthe key in keys.

See Also

Accessing Keys and Values

allKeys

A new array containing the dictionary’s keys, or an empty array if the dictionary has no entries.

- allKeysForObject:

Returns a new array containing the keys corresponding to all occurrences of a given object in the dictionary.

allValues

A new array containing the dictionary’s values, or an empty array if the dictionary has no entries.

- valueForKey:

Returns the value associated with a given key.

- getObjects:andKeys:count:

Returns by reference C arrays of the keys and values in the dictionary.

- getObjects:andKeys:

Returns by reference C arrays of the keys and values in the dictionary.

Deprecated
- objectForKey:

Returns the value associated with a given key.

- objectForKeyedSubscript:

Returns the value associated with a given key.