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

# UIMenuItem

A custom item in the editing menu managed by the menu controller.

```
@MainActor class UIMenuItem
```

## Overview

Custom menu items appear in the menu after any validated system items. A [`UIMenuItem`](/documentation/UIKit/UIMenuItem) object has two properties: a title and an action selector identifying the method to invoke in the handling responder object. Targets aren’t specified; a suitable target is found via normal traversal of the responder chain. To have custom menu items appear in the editing menu, you must add them to the [`menuItems`](/documentation/UIKit/UIMenuController/menuItems) property of the [`UIMenuController`](/documentation/UIKit/UIMenuController) object.

## Topics

### Creating a menu item

[`-  initWithTitle:action:`](/documentation/UIKit/UIMenuItem/init(title:action:))

Creates and returns a menu-item object initialized with the given title and action.

### Accessing menu-item attributes

[`title`](/documentation/UIKit/UIMenuItem/title)

The title of the menu item.

[`action`](/documentation/UIKit/UIMenuItem/action)

A selector identifying the method of the responder object to invoke for handling of the menu command.

## Relationships

### Conforms To

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

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)