<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIMenuLeaf",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIMenuLeaf"
  },
  "title" : "UIMenuLeaf"
}
-->

# UIMenuLeaf

An interface for an object that represents a menu element without child elements.

```
@MainActor protocol UIMenuLeaf : NSObjectProtocol
```

## Overview

`UIMenuLeaf` defines the behavior shared by menu elements that don’t have child elements. Don’t implement the `UIMenuLeaf` protocol in your object directly. Instead, create an appropriate object that implements this protocol, such as [`UIAction`](/documentation/UIKit/UIAction) or [`UICommand`](/documentation/UIKit/UICommand).

## Topics

### Managing the appearance

[`var title: String`](/documentation/UIKit/UIMenuLeaf/title)

A short display title for the menu element.

[`var discoverabilityTitle: String?`](/documentation/UIKit/UIMenuLeaf/discoverabilityTitle)

A long, informative title to use in the keyboard shortcut overlay.

[`var image: UIImage?`](/documentation/UIKit/UIMenuLeaf/image)

An image that appears next to the menu element.

[`var attributes: UIMenuElement.Attributes`](/documentation/UIKit/UIMenuLeaf/attributes)

The attributes that determine the style of the menu element.

[`var presentationSourceItem: (any UIPopoverPresentationControllerSourceItem)?`](/documentation/UIKit/UIMenuLeaf/presentationSourceItem)

The item you can use as an anchor for subsequent presentations.

### Managing the selection state

[`var state: UIMenuElement.State`](/documentation/UIKit/UIMenuLeaf/state)

The menu element’s selection state.

[`var selectedImage: UIImage?`](/documentation/UIKit/UIMenuLeaf/selectedImage)

An image that appears next to the menu element when the menu element is in the selected state.

### Performing actions

[`var sender: Any?`](/documentation/UIKit/UIMenuLeaf/sender)

The object on behalf of which to perform the menu element’s primary action.

[`func performWithSender(Any?, target: Any?)`](/documentation/UIKit/UIMenuLeaf/performWithSender(_:target:))

Performs the element’s primary action.

### Instance Properties

[`var preferredImageVisibility: UIMenuElement.ImageVisibility`](/documentation/UIKit/UIMenuLeaf/preferredImageVisibility)

The preferred visibility of the element’s image.

[`var repeatBehavior: UIMenuElement.RepeatBehavior`](/documentation/UIKit/UIMenuLeaf/repeatBehavior)

The leaf’s preferred repeat behavior.
Menu leaves can repeatedly perform their primary actions on prolonged interactions,
such as by holding down their keyboard shortcut.

[`var subtitle: String?`](/documentation/UIKit/UIMenuLeaf/subtitle)

The element’s subtitle.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Conforming Types

[`UICommand`](/documentation/UIKit/UICommand)

[`ActivationAction`](/documentation/UIKit/UIWindowScene/ActivationAction)

[`UIAction`](/documentation/UIKit/UIAction)

[`UIKeyCommand`](/documentation/UIKit/UIKeyCommand)

---

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)