---
title: "init(title:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nsmenu/init(title:)"
---

# init(title:)

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

## Declaration

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

## Parameters

- `title`: The title to assign to the menu.

## Return Value

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

## Discussion

Discussion This method is the designated initializer for the class.

## See Also

### Related Documentation

- [autoenablesItems](appkit/nsmenu/autoenablesitems.md)

### Creating an NSMenu Object

- [init(coder:)](appkit/nsmenu/init(coder:).md)
