Protocol

NSSpringLoadingDestination

The NSSpringLoadingDestination protocol declares methods that the destination object (or recipient) of a dragged object can implement to support spring-loading—the act of dragging an object onto a destination object and hovering or force clicking to activate the destination object.

Overview

A view can be configured as a drag-and-drop destination, a spring-loading destination, or both. If a view implements both drag-and-drop and spring-loading, then it will receive messages for both operations.

Note that the view beneath the cursor during a drag receives priority. For example, if a parent view implements drag-and-drop and a subview implements spring-loading, then the parent view will not receive drag-and-drop messages while the cursor is over the subview.

Symbols

Respond to Spring-loading Events

func springLoadingActivated(Bool, draggingInfo: NSDraggingInfo)
Required.

Responds to the activation or deactivation of spring-loading on a destination.

func springLoadingHighlightChanged(NSDraggingInfo)
Required.

Updates the destination’s user interface to display a new highlighting style during a spring-loading operation.

func springLoadingEntered(NSDraggingInfo)

Returns whether to enable or disable spring-loading when a drag enters the bounds of the spring-loading destination.

func springLoadingUpdated(NSDraggingInfo)

Returns whether to enable or disable spring-loading as a drag moves within the bounds of the spring-loading destination or draggingInfo changes during the drag.

func springLoadingExited(NSDraggingInfo)

Responds when a drag exits the bounds of the spring-loading destination.

func draggingEnded(NSDraggingInfo)

Responds to the end of a drag operation.

Constants

NSSpringLoadingOptions

These constants denote the type of spring-loading behavior configured for the destination object.

Relationships

Inherits From