---
title: "indexOfTickMark(at:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsslider/indexoftickmark(at:)"
---

# indexOfTickMark(at:)

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

## Declaration

```swift
func indexOfTickMark(at point: NSPoint) -> Int
```

## Parameters

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

## Return Value

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

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

- [allowsTickMarkValuesOnly](appkit/nsslider/allowstickmarkvaluesonly.md)
- [closestTickMarkValue(toValue:)](appkit/nsslider/closesttickmarkvalue(tovalue:).md)
- [numberOfTickMarks](appkit/nsslider/numberoftickmarks.md)
- [rectOfTickMark(at:)](appkit/nsslider/rectoftickmark(at:).md)
- [tickMarkPosition](appkit/nsslider/tickmarkposition-swift.property.md)
- [NSSlider.TickMarkPosition](appkit/nsslider/tickmarkposition-swift.enum.md)
- [tickMarkValue(at:)](appkit/nsslider/tickmarkvalue(at:).md)
