Adds an action to perform when the view appears.
SDKs
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
Framework
- Swift
UI
Adds an action to perform when the view appears.
SDKs
Framework
func on Disappear(perform: (() -> Void)?) -> View
Adds an action to perform when the view disappears.
func on Cut Command(perform: (() -> [NSItem Provider])?) -> View
Adds an action to perform in response to the system’s Cut command.
func on Copy Command(perform: (() -> [NSItem Provider])?) -> View
Adds an action to perform in response to the system’s Copy command.
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 Delete Command(perform: (() -> Void)?) -> View
Adds an action to perform in response to the system’s Delete command.
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 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 Play Pause Command(perform: (() -> Void)?) -> View
Adds an action to perform in response to the system’s Play/Pause command.
func on Command(Selector, perform: (() -> Void)?) -> View
Adds an action to perform in response to the given selector.
func delete Disabled(Bool) -> View
Adds a condition for whether the view’s view hierarchy is deletable.
func move Disabled(Bool) -> View
Adds a condition for whether the view's view hierarchy is movable.