Instance Method

springLoadingActivated:draggingInfo:

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

Required.

Declaration

- (void)springLoadingActivated:(BOOL)activated draggingInfo:(id<NSDraggingInfo>)draggingInfo;

Parameters

activated

A Boolean value indicating whether spring-loading has been activated on the destination. YES indicates that spring-loading has been activated. NO indicates that spring-loading has been deactivated.

draggingInfo

An NSDraggingInfo object, which provides information about the drag event, including the dragged data.

Discussion

Typically, spring-loading is fully activated when a hover timeout occurs or the user finishes force clicking on a destination object to initiate spring-loading. In these cases, the springLoadingActivated:draggingInfo: method is only called once with an activated parameter value of YES.

However, if the destination is configured with continuous activation (NSSpringLoadingOptions was set to NSSpringLoadingContinuousActivation), then the springLoadingActivated:draggingInfo: method is called twice. First, it’s called with an activated parameter value of YES when a hover timeout occurs or the user begins force clicking on a destination object to initiate spring-loading. Then, it’s called again with an activated parameter value of NO when the hover exits the destination’s bounds or the user finishes force clicking on the destination object.

See Also

Respond to Spring-loading Events

- springLoadingHighlightChanged:

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

Required.

- springLoadingEntered:

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

- springLoadingUpdated:

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.

- springLoadingExited:

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

- draggingEnded:

Responds to the end of a drag operation.