Contents

mouseEntered(with:)

Automatically sent to the receiver when the cursor enters a cursor rectangle owned by the receiver.

Declaration

func mouseEntered(with event: NSEvent)

Parameters

  • event:

    The event generated when the cursor enters the cursor rectangle.

Discussion

If used after setOnMouseEntered(_:) has been called with an argument of true, mouseEntered(with:) can make the receiver the current cursor.

In your programs, you won’t invoke mouseEntered(with:) explicitly. It’s only included in the class interface so you can override it.

For a more complete explanation, see Mouse-Tracking and Cursor-Update Events and the NSView method addTrackingRect(_:owner:userData:assumeInside:).

See Also

Deprecated