Enumeration

MoveCommandDirection

Specifies the direction of an arrow key movement.

Declaration

enum MoveCommandDirection

See Also

Handling View Events

func onAppear(perform: (() -> Void)?) -> View

Adds an action to perform when the view appears.

func onDisappear(perform: (() -> Void)?) -> View

Adds an action to perform when the view disappears.

func onCutCommand(perform: (() -> [NSItemProvider])?) -> View

Adds an action to perform in response to the system’s Cut command.

func onCopyCommand(perform: (() -> [NSItemProvider])?) -> View

Adds an action to perform in response to the system’s Copy command.

func onPasteCommand(of: [String], perform: ([NSItemProvider]) -> Void) -> View

Adds an action to perform in response to the system’s Paste command.

func onPasteCommand<Payload>(of: [String], validator: ([NSItemProvider]) -> Payload?, perform: (Payload) -> Void) -> View

Adds an action to perform in response to the system’s Paste command with items that you validate.

func onDeleteCommand(perform: (() -> Void)?) -> View

Adds an action to perform in response to the system’s Delete command.

func onMoveCommand(perform: ((MoveCommandDirection) -> 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 onExitCommand(perform: (() -> Void)?) -> View

Sets up an action that triggers in response to receiving the exit command while the view has focus.

func onPlayPauseCommand(perform: (() -> Void)?) -> View

Adds an action to perform in response to the system’s Play/Pause command.

func onCommand(Selector, perform: (() -> Void)?) -> View

Adds an action to perform in response to the given selector.

func deleteDisabled(Bool) -> View

Adds a condition for whether the view’s view hierarchy is deletable.

func moveDisabled(Bool) -> View

Adds a condition for whether the view's view hierarchy is movable.