The NSDraggingInfo protocol declares methods that supply information about a dragging session.


NSDraggingInfo protocol methods are designed to be invoked from within a class’s implementation of NSDraggingDestination protocol methods. AppKit automatically passes an object that conforms to the NSDraggingInfo protocol as the argument to each of the methods defined by NSDraggingDestination. NSDraggingInfo messages should be sent to this object; you never need to create a class that implements the NSDraggingInfo protocol.


Obtaining Information About the Dragging Session

func draggingPasteboard()

Returns the pasteboard object that holds the data being dragged.

func draggingSequenceNumber()

Returns a number that uniquely identifies the dragging session.

func draggingSource()

Returns the source, or owner, of the dragged data.

func draggingSourceOperationMask()

Returns the dragging operation mask of the dragging source.

func draggingLocation()

Returns the current location of the mouse pointer in the base coordinate system of the destination object’s window.

func draggingDestinationWindow()

Returns the destination window for the dragging operation.

func namesOfPromisedFilesDropped(atDestination: URL)

Sets the drop location for promised files and returns the names of the files that the receiver promises to create there.

var numberOfValidItemsForDrop: Int

Specifies the number of valid items for a drop operation.

Getting Image Information

func draggedImage()

Returns the image being dragged.

func draggedImageLocation()

Returns the current location of the dragged image’s origin.

Sliding the Image

func slideDraggedImage(to: NSPoint)

Slides the image to a specified location.

var animatesToDestination: Bool

Returns whether the dragging formation animates while the drag is over this destination.

var draggingFormation: NSDraggingFormation

Returns the dragging formation while the drag is over this destination.

Implementing Spring-Loading Support

var springLoadingHighlight: NSSpringLoadingHighlight

Highlighting style to be displayed by your app’s user interface during a spring-loading operation.

func resetSpringLoading()

Resets a spring-loading operation to its initial state.



These constants indicate a highlighting style to be displayed by your app’s user interface during a spring-loading operation. One of these constant values will be provided by the springLoadingHighlight method.


These constants control the visual format of multiple items being dragged.


These parameters specify whether a drag terminates within or outside the application.


Inherits From