public interface UIDragDropSession
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsMoveOperation()
Whether this session allows moving, or not.
|
boolean |
canLoadObjectsOfClass(NSItemProviderReading aClass)
Returns true if any of the session's items could create any objects of the specified class.
|
boolean |
hasItemsConformingToTypeIdentifiers(NSArray<java.lang.String> typeIdentifiers)
Convenience methods to iterate through this session's `items`.
|
boolean |
isRestrictedToDraggingApplication()
Whether this session is restricted to the application that began the drag.
|
NSArray<? extends UIDragItem> |
items()
The items in the session.
|
CGPoint |
locationInView(UIView view)
The location of the drag in the specified view.
|
boolean allowsMoveOperation()
This is determined based on the UIDragInteraction's delegate's `-dragInteraction:sessionAllowsMoveOperation:`.
If true, then the delegate of UIDropInteraction is allowed to return `UIDropOperationMove` from `-dropInteraction:sessionDidUpdate:`.
boolean canLoadObjectsOfClass(NSItemProviderReading aClass)
boolean hasItemsConformingToTypeIdentifiers(NSArray<java.lang.String> typeIdentifiers)
Returns true if any of the session's items conforms to any of the specified UTIs.
boolean isRestrictedToDraggingApplication()
This is determined based on the UIDragInteraction's delegate's `-dragInteraction:sessionIsRestrictedToDraggingApplication:`.
NSArray<? extends UIDragItem> items()
Before the drop happens, the items' NSItemProviders do not allow the data in the NSItemProvider to be loaded. However, `registeredTypeIdentifiers` and metadata are available at any time. You may request the data only inside the UIDropInteractionDelegate's implementation of `-dropInteraction:performDrop:`.
When handling the drop, if you display dropped items in a linear order, place them in this order, first to last.