Instance Method

objectEnumerator()

Returns an enumerator object that lets you access each value in the map table.

Declaration

func objectEnumerator() -> NSEnumerator?

Return Value

An enumerator object that lets you access each value in the map table.

Discussion

The following code fragment illustrates how you might use the method.

NSEnumerator *enumerator = [myMapTable objectEnumerator];
id value;
 
while ((value = [enumerator nextObject])) {
    /* code that acts on the map table's values */
}

Special Considerations

It is more efficient to use the fast enumeration protocol (see NSFastEnumeration).

See Also

Accessing Content

func object(forKey: KeyType?) -> ObjectType?

Returns a the value associated with a given key.

func keyEnumerator() -> NSEnumerator

Returns an enumerator object that lets you access each key in the map table.

var count: Int

The number of key-value pairs in the map table.

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