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 : TransferableParameters
- 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.