---
title: "NSCreateMapTable(_:_:_:)"
framework: foundation
role: symbol
role_heading: Function
path: "foundation/nscreatemaptable(_:_:_:)"
---

# NSCreateMapTable(_:_:_:)

Creates a new map table in the default zone.

## Declaration

```swift
func NSCreateMapTable(_ keyCallBacks: NSMapTableKeyCallBacks, _ valueCallBacks: NSMapTableValueCallBacks, _ capacity: Int) -> NSMapTable<AnyObject, AnyObject>
```

## Discussion

Discussion Creates and returns a pointer to an NSMapTable structure in the default zone; the table’s size is dependent on (but generally not equal to) capacity. If capacity is 0, a small map table is created. The NSMapTableKeyCallBacks arguments are structures that are very similar to the callback structure used by NSCreateHashTable(_:_:)—they have the same defaults as documented for that function.

## See Also

### Related Documentation

- [NSCreateMapTableWithZone(_:_:_:_:)](foundation/nscreatemaptablewithzone(_:_:_:_:).md)
- [NSCopyMapTableWithZone(_:_:)](foundation/nscopymaptablewithzone(_:_:).md)

### Functions

- [NSAllMapTableKeys(_:)](foundation/nsallmaptablekeys(_:).md)
- [NSAllMapTableValues(_:)](foundation/nsallmaptablevalues(_:).md)
- [NSCompareMapTables(_:_:)](foundation/nscomparemaptables(_:_:).md)
- [NSCopyMapTableWithZone(_:_:)](foundation/nscopymaptablewithzone(_:_:).md)
- [NSCountMapTable(_:)](foundation/nscountmaptable(_:).md)
- [NSCreateMapTableWithZone(_:_:_:_:)](foundation/nscreatemaptablewithzone(_:_:_:_:).md)
- [NSEndMapTableEnumeration(_:)](foundation/nsendmaptableenumeration(_:).md)
- [NSEnumerateMapTable(_:)](foundation/nsenumeratemaptable(_:).md)
- [NSFreeMapTable(_:)](foundation/nsfreemaptable(_:).md)
- [NSMapGet(_:_:)](foundation/nsmapget(_:_:).md)
- [NSMapInsert(_:_:_:)](foundation/nsmapinsert(_:_:_:).md)
- [NSMapInsertIfAbsent(_:_:_:)](foundation/nsmapinsertifabsent(_:_:_:).md)
- [NSMapInsertKnownAbsent(_:_:_:)](foundation/nsmapinsertknownabsent(_:_:_:).md)
- [NSMapMember(_:_:_:_:)](foundation/nsmapmember(_:_:_:_:).md)
- [NSMapRemove(_:_:)](foundation/nsmapremove(_:_:).md)
