<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSMenu/didAddItemNotification",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@NSMenuDidAddItemNotification"
  },
  "title" : "didAddItemNotification"
}
-->

# didAddItemNotification

Posted after a menu item is added to the menu.

```
class let didAddItemNotification: NSNotification.Name
```

## Discussion

The notification object is the instance of `NSMenu` that just added the new menu item. The `userInfo` dictionary contains the following information.

|Key                 |Value                                                                             |
|--------------------|----------------------------------------------------------------------------------|
|`@"NSMenuItemIndex"`|An `NSNumber` object containing the integer index of the menu item that was added.|

To observe this notification using Swift concurrency, use [`NSMenu.DidAddItemMessage`](/documentation/AppKit/NSMenu/DidAddItemMessage).

---

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)