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

# delegate

The delegate of the menu.

```
weak var delegate: (any NSMenuDelegate)? { get set }
```

## Discussion

This property indicates the delegate of the menu.

You can use the delegate to populate a menu just before it is drawn and to check for key equivalents without creating a menu item.

## See Also

[`NSMenuDelegate`](/documentation/AppKit/NSMenuDelegate)

The optional methods implemented by delegates of [`NSMenu`](/documentation/AppKit/NSMenu) objects to manage menu display and handle some events.



---

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)