One Logo Pool Ball
UIKit · IOS API REFERENCE

UIMenu

class · iOS 13.0+ · SDK 27.1

@MainActor class UIMenu

Members (14)

init · iOS 13.0+

init

TypeScript
static initCoder(coder: _Foundation_NSCoder): Promise<(UIMenu) | null>
Swift declaration
init?(coder: NSCoder)
method · iOS 13.0+

replacingChildren

TypeScript
replacingChildren(newChildren: Array<UIMenuElement>): Promise<UIMenu>
Swift declaration
func replacingChildren(_ newChildren: [UIMenuElement]) -> UIMenu
get · iOS 13.0+

children

TypeScript
get children(): Promise<Array<UIMenuElement>>
Swift declaration
var children: [UIMenuElement] { get }
get · iOS 17.4+

displayPreferences

TypeScript
get displayPreferences(): Promise<(UIMenuDisplayPreferences) | null>
Swift declaration
@NSCopying var displayPreferences: UIMenuDisplayPreferences? { get set }
set · iOS 17.4+

displayPreferences

TypeScript
setDisplayPreferences(value?: (UIMenuDisplayPreferences) | null): Promise<void>
Swift declaration
@NSCopying var displayPreferences: UIMenuDisplayPreferences? { get set }
get · iOS 13.0+

identifier

TypeScript
get identifier(): Promise<UIMenu_Identifier>
Swift declaration
var identifier: UIMenu.Identifier { get }
get · iOS 13.0+

options

TypeScript
get options(): Promise<UIMenu_Options>
Swift declaration
var options: UIMenu.Options { get }
get · iOS 16.0+

preferredElementSize

TypeScript
get preferredElementSize(): Promise<UIMenu_ElementSize>
Swift declaration
var preferredElementSize: UIMenu.ElementSize { get set }
set · iOS 16.0+

preferredElementSize

TypeScript
setPreferredElementSize(value: UIMenu_ElementSize): Promise<void>
Swift declaration
var preferredElementSize: UIMenu.ElementSize { get set }
get · iOS 15.0+

selectedElements

TypeScript
get selectedElements(): Promise<Array<UIMenuElement>>
Swift declaration
var selectedElements: [UIMenuElement] { get }
init · iOS 13.0+

init

TypeScript
static initTitleImageIdentifierOptionsChildren(title?: string, image?: (UIImage) | null, identifier?: (UIMenu_Identifier) | null, options?: UIMenu_Options, children?: Array<UIMenuElement>): Promise<UIMenu>
Swift declaration
@MainActor @preconcurrency convenience init(title: String = "", image: UIImage? = nil, identifier: UIMenu.Identifier? = nil, options: UIMenu.Options = [], children: [UIMenuElement] = [])
init · iOS 16.0+

init

TypeScript
static initTitleSubtitleImageIdentifierOptionsPreferredElementSizeChildren(title?: string, subtitle?: (string) | null, image?: (UIImage) | null, identifier?: (UIMenu_Identifier) | null, options?: UIMenu_Options, preferredElementSize?: UIMenu_ElementSize, children?: Array<UIMenuElement>): Promise<UIMenu>
Swift declaration
@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] = [])
init · iOS 15.0+

init

TypeScript
static initTitleSubtitleImageIdentifierOptionsChildren(title?: string, subtitle?: (string) | null, image?: (UIImage) | null, identifier?: (UIMenu_Identifier) | null, options?: UIMenu_Options, children?: Array<UIMenuElement>): Promise<UIMenu>
Swift declaration
@MainActor @preconcurrency convenience init(title: String = "", subtitle: String? = nil, image: UIImage? = nil, identifier: UIMenu.Identifier? = nil, options: UIMenu.Options = [], children: [UIMenuElement] = [])
init · iOS 27.0+

init

TypeScript
static initTitleSubtitleImagePreferredImageVisibilityIdentifierOptionsPreferredElementSizeChildren(title?: string, subtitle?: (string) | null, image?: (UIImage) | null, preferredImageVisibility?: UIMenuElement_ImageVisibility, identifier?: (UIMenu_Identifier) | null, options?: UIMenu_Options, preferredElementSize?: UIMenu_ElementSize, children?: Array<UIMenuElement>): Promise<UIMenu>
Swift declaration
@MainActor @preconcurrency convenience init(title: String = "", subtitle: String? = nil, image: UIImage? = nil, preferredImageVisibility: UIMenuElement.ImageVisibility = .automatic, identifier: UIMenu.Identifier? = nil, options: UIMenu.Options = [], preferredElementSize: UIMenu.ElementSize = .automatic, children: [UIMenuElement] = [])

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

UIMenu.init()

inherited init: cannot prove legal (class declares 4 custom initializers)

All UIKit types →