Contents

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.

Declaration

@MainActor optional func springLoadingUpdated(_ draggingInfo: any NSDraggingInfo) -> NSSpringLoadingOptions

Parameters

  • draggingInfo:

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

Return Value

A value of type NSSpringLoadingOptions to enable or disable spring-loading. A value of NSSpringLoadingEnabled enables typical spring-loading behavior.

Discussion

This method is called periodically as a drag changes position within the bounds of a spring-loaded destination or the draggingInfo changes during the drag. It returns a value of type NSSpringLoadingOptions to enable or disable spring-loading for the destination. If this method is not implemented, then spring-loading is enabled or disabled for the destination based on the return value of the springLoadingEntered: method.

Note that you must implement either this method or springLoadingEntered(_:) to enable spring-loading.

See Also

Related Documentation

Respond to Spring-loading Events