Contents

indexOfTickMark(at:)

Returns the index of the tick mark closest to the location of the slider represented by the given point.

Declaration

func indexOfTickMark(at point: NSPoint) -> Int

Parameters

  • point:

    The point representing the location for which to retrieve the tick mark.

Return Value

The index of the tick mark closest to the location specified by point. If point is not within the bounding rectangle (plus an extra pixel of space) of any tick mark, the method returns NSNotFound.

Discussion

In its implementation of this method, the receiving NSSlider instance invokes the method of the same name of its NSSliderCell instance. This method invokes rectOfTickMark(at:) for each tick mark on the slider until it finds a tick mark containing the point.

See Also

Managing tick marks