Type Method


Creates a shared key set object for the specified keys.


class func sharedKeySet(forKeys keys: [NSCopying]) -> Any



The array of keys. If the parameter is nil, an exception is thrown. If the array of keys is empty, an empty key set is returned.

Return Value

A shared key set object.


The array of keys may contain duplicates which are quietly ignored. Duplicate hash values of the keys are quietly allowed, but may cause lower performance and increase memory usage.

Typically you would create a shared key set for a given set of keys once, before creating shared key dictionaries, and retain and save the result of this method for use with the NSMutableDictionary class method dictionaryWithSharedKeySet:.

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