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

# init(title:)

Initializes and returns a menu having the specified title and with autoenabling of menu items turned on.

```
init(title: String)
```

## Parameters

`title`

The title to assign to the menu.

## Return Value

The initialized `NSMenu` object or `nil` if the object could not be initialized.

## Discussion

This method is the designated initializer for the class.

## See Also

[`autoenablesItems`](/documentation/AppKit/NSMenu/autoenablesItems)

Indicates whether the menu automatically enables and disables its menu items.



---

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)