Returns an enumerator object that lets you access each value in the dictionary.
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
An enumerator object that lets you access each value in the dictionary.
The following code fragment illustrates how you might use the method.
If you use this method with instances of mutable subclasses of
NSDictionary, your code should not modify the entries during enumeration. If you intend to modify the entries, use the
all method to create a “snapshot” of the dictionary’s values. Work from this snapshot to modify the values.
It is more efficient to use the fast enumeration protocol (see
NSFast). Fast enumeration is available in macOS 10.5 and later and iOS 2.0 and later.