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
prompt
The instruction provided when the menu is presented.
groupingIdentifier
An optional UUID, useful for building deterministic output.
items
The menu items that the user can choose from.