ChooseFromMenu
public struct ChooseFromMenu : Shortcut
Presents a menu and runs different actions based on which menu item was chosen.
-
The contents of the shortcut.
Declaration
Swift
public var body: some Shortcut { get } -
Initializes the shortcut.
Declaration
Swift
public init(prompt: String = "", groupingIdentifier: UUID = UUID(), items: [MenuItem])Parameters
promptThe instruction provided when the menu is presented.
groupingIdentifierAn optional UUID, useful for building deterministic output.
itemsThe menu items that the user can choose from.
View on GitHub
ChooseFromMenu Structure Reference