Contents

loadTransferable(type:completionHandler:)

Attempts to load an instance of the type you specify from the item provider, with a completion handler.

Declaration

@discardableResult @preconcurrency func loadTransferable<T>(type: T.Type, completionHandler: @escaping  @Sendable (Result<T?, any Error>) -> Void) -> Progress where T : Transferable

Parameters

  • type:

    A conforming type to load from an item provider.

  • completionHandler:

    The completion callback handler with a result object that contains an instance if the system finds a supported content type; otherwise, nil.

See Also

Loading the provider’s contents