init(payloadType:onPaste:)
Creates an instance that accepts values of the specified type.
Declaration
nonisolated init<T>(payloadType: T.Type, onPaste: @escaping ([T]) -> Void) where T : TransferableParameters
- payloadType:
The type that you want to paste via the
PasteButton. - onPaste:
The handler to call on trigger of the button with at least one item of the specified
Transferabletype from the pasteboard.