One Logo Pool Ball
UIKit · IOS API REFERENCE

UICommand

class · iOS 13.0+ · SDK 27.1

@MainActor class UICommand

Members (13)

init · iOS 13.0+

init

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

alternates

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

attributes

TypeScript
get attributes(): Promise<UIMenuElement_Attributes>
Swift declaration
var attributes: UIMenuElement.Attributes { get set }
set · iOS 13.0+

attributes

TypeScript
setAttributes(value: UIMenuElement_Attributes): Promise<void>
Swift declaration
var attributes: UIMenuElement.Attributes { get set }
get · iOS 13.0+

discoverabilityTitle

TypeScript
get discoverabilityTitle(): Promise<(string) | null>
Swift declaration
var discoverabilityTitle: String? { get set }
set · iOS 13.0+

discoverabilityTitle

TypeScript
setDiscoverabilityTitle(value?: (string) | null): Promise<void>
Swift declaration
var discoverabilityTitle: String? { get set }
get · iOS 13.0+

image

TypeScript
get image(): Promise<(UIImage) | null>
Swift declaration
@NSCopying var image: UIImage? { get set }
set · iOS 13.0+

image

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

propertyList

TypeScript
get propertyList(): Promise<(unknown) | null>
Swift declaration
var propertyList: Any? { get }
get · iOS 13.0+

state

TypeScript
get state(): Promise<UIMenuElement_State>
Swift declaration
var state: UIMenuElement.State { get set }
set · iOS 13.0+

state

TypeScript
setState(value: UIMenuElement_State): Promise<void>
Swift declaration
var state: UIMenuElement.State { get set }
get · iOS 13.0+

title

TypeScript
get title(): Promise<string>
Swift declaration
var title: String { get set }
set · iOS 13.0+

title

TypeScript
setTitle(value: string): Promise<void>
Swift declaration
var title: String { get set }

Skipped declarations

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

UICommand.init(title:image:action:propertyList:alternates:discoverabilityTitle:attributes:state:)

Objective-C selectors cannot cross the bridge.

UICommand.init(title:subtitle:image:action:propertyList:alternates:discoverabilityTitle:attributes:state:)

Objective-C selectors cannot cross the bridge.

UICommand.init(title:subtitle:image:selectedImage:action:propertyList:alternates:discoverabilityTitle:attributes:state:)

Objective-C selectors cannot cross the bridge.

UICommand.init(title:subtitle:image:selectedImage:preferredImageVisibility:action:propertyList:alternates:discoverabilityTitle:attributes:state:)

Objective-C selectors cannot cross the bridge.

UICommand.action

Objective-C selectors cannot cross the bridge.

UICommand.init()

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

All UIKit types →