Adds an action to perform in response to the system’s Cut command.
SDKs
- macOS 10.15+
- Xcode 11.0+
Framework
- Swift
UI
Declaration
func onCutCommand(perform payloadAction: (() -> [NSItem Provider])?) -> some View
Adds an action to perform in response to the system’s Cut command.
SDKs
Framework
func onCutCommand(perform payloadAction: (() -> [NSItem Provider])?) -> some View
func on Appear(perform: (() -> Void)?) -> View
Adds an action to perform when the view appears.
func on Disappear(perform: (() -> Void)?) -> View
Adds an action to perform when the view disappears.
func on Command(Selector, perform: (() -> Void)?) -> View
Adds an action to perform in response to the given selector.
func on Copy Command(perform: (() -> [NSItem Provider])?) -> View
Adds an action to perform in response to the system’s Copy command.
func on Delete Command(perform: (() -> Void)?) -> View
Adds an action to perform in response to the system’s Delete command.
func on Exit Command(perform: (() -> Void)?) -> View
Sets up an action that triggers in response to receiving the exit command while the view has focus.
func on Move Command(perform: ((Move Command Direction) -> Void)?) -> View
Adds an action to perform in response to a move command, like when the user presses an arrow key on a Mac keyboard, or taps the edge of the Siri Remote when controlling an Apple TV.
func on Paste Command(of: [String], perform: ([NSItem Provider]) -> Void) -> View
Adds an action to perform in response to the system’s Paste command.
func on Paste Command<Payload>(of: [String], validator: ([NSItem Provider]) -> Payload?, perform: (Payload) -> Void) -> View
Adds an action to perform in response to the system’s Paste command with items that you validate.
func on Play Pause Command(perform: (() -> Void)?) -> View
Adds an action to perform in response to the system’s Play/Pause command.
func on Receive<P>(P, perform: (P .Output) -> Void) -> View
Adds an action to perform when this view detects data emitted by the given publisher.