onCutCommand(perform:)
Adds an action to perform in response to the system’s Cut command.
Declaration
nonisolated func onCutCommand(perform payloadAction: (() -> [NSItemProvider])?) -> some View
Parameters
- payloadAction:
An action closure that should delete the selected data and return Nsitemprovider items corresponding to that data, which should be written to the Clipboard. If
actionisnil, the Cut command is considered disabled.
Return Value
A view that triggers action when a system Cut command occurs.