Drag and Drop API

Using the Drag and Drop API, you can enable the option to drag images, text, and files from one application to another. To drag and drop the files between two applications, ensure that both the applications are open using the app switcher or the Split-View multitasking window.

IMPORTANT: The Drag and Drop API is applicable to ipad only. The feature is introduced in iOS 11.

 

The Drag and Drop API contains the kony.dragdrop Namespace and the following API elements.

FunctionDescription
kony.dragdrop.DragInteractionCreates a new DragInteraction object and attaches the DragInteraction object to a widget.
kony.dragdrop.DropInteractionCreates a new DropInteraction object and attaches it to a widget.
kony.dragdrop.removeDragInteractionDetaches the DragInteraction object from the widget.
kony.dragdrop.removeDropInteractionDetaches the DropInteraction object from the widget.
 

To enable the drag feature on a widget in an application, create a dragInteraction object and attach the object to the widget by using the kony.dragdrop.DragInteraction function. You can enable the drop feature foe a widget by using the kony.dragdrop.DropInteraction function. If you want to remove the Drag and Drop functionalities from the widget, use the kony.dragdrop.removeDragInteraction and kony.dragdrop.removeDropInteraction functions.

To view the functionality of the Drag and Drop API in action, download the sample application from the link below. Once the application is downloaded, build and preview the application using the Quantum App.