Tells the delegate it can request the item provider data from the session’s drag items.
The interaction that called this method.
The session containing the drag items.
You can request a drag item's itemProvider data within the scope of this method only and not at any other time.
To request the data, iterate over the session items calling loadObject(ofClass:completionHandler:) on each item’s item provider. For example, if you are expecting the drag items to be images, here's how you can load each image:
If you need to be more specific about the type of data to load, use one of the following methods to specify the desired data type using its uniform type identifier (UTI):
If you want only JPEG images, use the UTI for the JPEG image type:
You can also use the session’s convenience method loadObjects(ofClass:completion:) to load the data for an item. Note that the completion handler for this method is called on the main thread, which is not true when loading the data from the item provider.
When you ask the session or item provider to load its data, it gives you a Progress object. You can also get the progress for the session at a later time from its progress property.
The Progress object tells you how much of the data transfer is complete and if the transfer has finished. What’s more, it can be used to cancel, pause, and resume the data-load process.