A set of methods that are implemented by the source object in a dragging session.


protocol NSDraggingSource


In macOS 10.7 and later NSDraggingSource is now a formal protocol and has an updated interface. The OS X v10.6 behavior has been retained, but will be dropped in a future version of the operating system. The methods that are to be deprecated are marked as such.


Dragging Session Operation

func draggingSession(NSDraggingSession, sourceOperationMaskFor: NSDraggingContext) -> NSDragOperation

Declares the types of operations the source allows to be performed.


Dragging Session Locations

Dragging Session Modifier Keys

func ignoreModifierKeys(for: NSDraggingSession) -> Bool

Returns whether the modifier keys will be ignored for this dragging session.

Dragging Options

func namesOfPromisedFilesDropped(atDestination: URL) -> [String]?

Returns the names of the files that the receiver promises to create at a specified location.


See Also

Drag Sources

class NSDraggingItem

A single dragged item within a dragging session.

class NSDraggingSession

The encapsulation of a drag-and-drop action that supports modification of the drag while in progress.

class NSDraggingImageComponent

A single object in a dragging item.