Type Method


Creates a mutable dictionary which is optimized for dealing with a known set of keys.


+ (NSMutableDictionary<KeyType, ObjectType> *)dictionaryWithSharedKeySet:(id)keyset;



The keyset, created by the NSDictionary class method sharedKeySetForKeys:.

Return Value

A new mutable dictionary optimized for a known set of keys.


Keys that are not in the key set can still be set in the dictionary, but that usage is not optimal.

See Also

Creating and Initializing a Mutable Dictionary

+ dictionaryWithCapacity:

Creates and returns a mutable dictionary, initially giving it enough allocated memory to hold a given number of entries.

- initWithCapacity:

Initializes a newly allocated mutable dictionary, allocating enough memory to hold numItems entries.

- init

Initializes a newly allocated mutable dictionary.

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