Contents

init(payloadType:onPaste:)

Creates an instance that accepts values of the specified type.

Declaration

@MainActor @preconcurrency init<T>(payloadType: T.Type, onPaste: @escaping ([T]) -> Void) where T : Transferable

Parameters

  • onPaste:

    The handler to call on trigger of the button with at least one item of the specified Transferable type from the pasteboard.

See Also

Creating a paste button