Contents

startTracking(at:in:)

Begins tracking mouse events within the receiver.

Declaration

func startTracking(at startPoint: NSPoint, in controlView: NSView) -> Bool

Parameters

  • startPoint:

    The initial location of the cursor.

  • controlView:

    The NSControl object managing the receiver.

Return Value

true if the receiver is set to respond continuously or set to respond when the mouse is dragged, otherwise false.

Discussion

The NSCell implementation of trackMouse(with:in:of:untilMouseUp:) invokes this method when tracking begins. Subclasses can override this method to implement special mouse-tracking behavior at the beginning of mouse tracking—for example, displaying a special cursor.

See Also

Tracking the Mouse