Instance Method

getObjects:andKeys:count:

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

Declaration

- (void)getObjects:(ObjectType  _Nonnull *)objects andKeys:(KeyType  _Nonnull *)keys count:(NSUInteger)count;

Parameters

objects

Upon return, contains a C array of the values in the dictionary.

keys

Upon return, contains a C array of the keys in the dictionary.

count

The maximum number of objects to return.

Discussion

The elements in the returned array and the keys array have a one-for-one correspondence, so that the nth object in the returned array corresponds to the the 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:

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

Deprecated
- objectsForKeys:notFoundMarker:

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

- objectForKey:

Returns the value associated with a given key.

- objectForKeyedSubscript:

Returns the value associated with a given key.