Tells the delegate it can request the item provider data from the session’s drag items.
Mac Catalyst 13.0+Beta
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 loadObjectOfClass: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 loadObjectsOfClass: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 NSProgress object. You can also get the progress for the session at a later time from its progress property.
The NSProgress 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.
Asks the delegate whether it can handle the session’s drag items.
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.