<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSMenu/addItem(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMenu(im)addItem:"
  },
  "title" : "addItem(_:)"
}
-->

# addItem(_:)

Adds a menu item to the end of the menu.

```
func addItem(_ newItem: NSMenuItem)
```

## Parameters

`newItem`

The menu item (an object conforming to the NSMenuItem protocol) to add to the menu.

## Discussion

This method invokes [`insertItem(_:at:)`](/documentation/AppKit/NSMenu/insertItem(_:at:)). Thus, the menu does not accept the menu item if it already belongs to another menu. After adding the menu item, the menu updates itself.

---

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)