<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "tvOS: 16.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIMenu/init(title:subtitle:image:identifier:options:preferredElementSize:children:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:So6UIMenuC5UIKitE5title8subtitle5image10identifier7options20preferredElementSize8childrenABSS_SSSgSo7UIImageCSgSo0A10IdentifieraSgSo0A7OptionsVSo0aiJ0VSaySo0aI0CGtcfc"
  },
  "title" : "init(title:subtitle:image:identifier:options:preferredElementSize:children:)"
}
-->

# init(title:subtitle:image:identifier:options:preferredElementSize:children:)

Creates a new menu with the specified title, subtitle, image, identifier, menu options, element size, and child elements.

```
@MainActor @preconcurrency convenience init(title: String = "", subtitle: String? = nil, image: UIImage? = nil, identifier: UIMenu.Identifier? = nil, options: UIMenu.Options = [], preferredElementSize: UIMenu.ElementSize = { if #available(iOS 17.0, tvOS 17.0, watchOS 10.0, *) { .automatic } else { .large } }(), children: [UIMenuElement] = [])
```

## Parameters

`title`

The title of the menu.

`subtitle`

The subtitle of the menu.

`image`

The image to display next to the menu’s title.

`identifier`

The unique identifier for the menu. When creating standard menus for your app, specify an appropriate constant defined in [`UIMenu.Identifier`](/documentation/UIKit/UIMenu/Identifier-swift.struct). For custom menus, specify a custom reverse domain name value, or specify `nil` to let this method create a unique identifier for you.

`options`

Additional configuration options for the menu. For a list of possible values, see [`UIMenu.Options`](/documentation/UIKit/UIMenu/Options-swift.struct).

`preferredElementSize`

The size of the menu’s child elements. For a list of possible values, see [`UIMenu.ElementSize`](/documentation/UIKit/UIMenu/ElementSize).

`children`

The menu elements in the menu. Specify leaf menu elements using [`UIMenuElement`](/documentation/UIKit/UIMenuElement) subclasses like [`UIAction`](/documentation/UIKit/UIAction), [`UICommand`](/documentation/UIKit/UICommand), or [`UIKeyCommand`](/documentation/UIKit/UIKeyCommand), and specify submenus using [`UIMenu`](/documentation/UIKit/UIMenu) objects. You may specify an empty array if the menu has no child menu elements.

---

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)