Protocol

NSDraggingDestination

A set of methods that the destination object (or recipient) of a dragged image must implement.

Declaration

@protocol NSDraggingDestination

Overview

The destination automatically receives NSDraggingDestination messages for pasteboard data types it has registered for as an image enters, moves around inside, and then exits or is released within the destination’s boundaries.

In macOS 10.7 and later NSDraggingDestination is a formal protocol with 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.

Topics

Managing a Dragging Session Before an Image Is Released

draggingEntered:

Invoked when the dragged image enters destination bounds or frame; delegate returns dragging operation to perform.

wantsPeriodicDraggingUpdates

Asks the destination object whether it wants to receive periodic draggingUpdated: messages.

draggingUpdated:

Invoked periodically as the image is held within the destination area, allowing modification of the dragging operation or mouse-pointer position.

draggingEnded:

Called when a drag operation ends.

draggingExited:

Invoked when the dragged image exits the destination’s bounds rectangle (in the case of a view object) or its frame rectangle (in the case of a window object).

Managing a Dragging Session After an Image Is Released

prepareForDragOperation:

Invoked when the image is released, allowing the receiver to agree to or refuse drag operation.

performDragOperation:

Invoked after the released image has been removed from the screen, signaling the receiver to import the pasteboard data.

concludeDragOperation:

Invoked when the dragging operation is complete, signaling the receiver to perform any necessary clean-up.

Updating Dragging Images

updateDraggingItemsForDrag:

Invoked when the dragging images should be changed.

Relationships

Inherits From

Conforming Types

See Also

Drop Targets

NSDraggingInfo

A set of methods that supply information about a dragging session.

NSSpringLoadingDestination

A set of methods that the destination object (or recipient) of a dragged object can implement to support spring-loading.