Adds an action to perform in response to the system’s Paste command with items that you validate.
SDKs
- macOS 10.15+
- Xcode 11.0+
Framework
- Swift
UI
Declaration
func onPasteCommand<Payload>(of supportedTypes: [String], validator: @escaping ([NSItem Provider]) -> Payload?, perform payloadAction: @escaping (Payload) -> Void) -> some View