---
title: "setTitleWithMnemonic(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsmenuitem/settitlewithmnemonic(_:)"
---

# setTitleWithMnemonic(_:)

Sets the title of a menu item with a character denoting an access key.

## Declaration

```swift
func setTitleWithMnemonic(_ stringWithAmpersand: String)
```

## Discussion

Discussion Use an ampersand character to mark the character (the one following the ampersand) to be designated.
