Contents

springLoadingEntered(_:)

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

Declaration

@MainActor optional func springLoadingEntered(_ 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. Returning a value of NSSpringLoadingEnabled enables typical spring-loading behavior that is appropriate in most cases.

Discussion

This method is called when a drag enters the bounds of the spring-loading destination. It returns a value of type NSSpringLoadingOptions to enable or disable spring-loading for the destination.

This method provides an opportunity to perform work in preparation for spring-loading becoming engaged.

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

See Also

Related Documentation

Respond to Spring-loading Events