Type Alias

NSItemProviderCompletionHandler

A block that receives the item provider’s data.

Declaration

typedef void (^NSItemProviderCompletionHandler)(id<NSSecureCoding> item, NSError *error);

Discussion

Use this block to receive data from a call to the loadItemForTypeIdentifier:options:completionHandler: method. This block takes the following parameters:

item

The item to be loaded. When specifying your block, set the type of this parameter to the specific data type you want. For example, when requesting text data, you might set the type to NSString or NSAttributedString. The item provider attempts to coerce the data to the class you specify.

error

A pointer to an error object for receiving information about any problems that occurred when loading the data.