<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSEnumerateMapTable(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@F@NSEnumerateMapTable"
  },
  "title" : "NSEnumerateMapTable(_:)"
}
-->

# NSEnumerateMapTable(_:)

Creates an enumerator for the specified map table.

```
func NSEnumerateMapTable(_ table: NSMapTable<AnyObject, AnyObject>) -> NSMapEnumerator
```

## Parameters

`table`

A reference to a map table structure.

## Return Value

An `NSMapEnumerator` structure that will cause successive key-value pairs of `table` to be visited each time this enumerator is passed to `NSNextMapEnumeratorPair`.

## See Also

[`NSMapMember`](/documentation/Foundation/NSMapMember(_:_:_:_:))

Indicates whether a given table contains a given key.

[`NSNextMapEnumeratorPair`](/documentation/Foundation/NSNextMapEnumeratorPair(_:_:_:))

Returns a Boolean value that indicates whether the next map-table pair in the enumeration are set.

[`NSAllMapTableValues`](/documentation/Foundation/NSAllMapTableValues(_:))

Returns all of the values in the specified table.

[`NSMapGet`](/documentation/Foundation/NSMapGet(_:_:))

Returns a map table value for the specified key.

[`NSAllMapTableKeys`](/documentation/Foundation/NSAllMapTableKeys(_:))

Returns all of the keys in the specified map table.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)