---
title: numberOfTickMarks
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsslider/numberoftickmarks
---

# numberOfTickMarks

The number of tick marks associated with the slider.

## Declaration

```swift
var numberOfTickMarks: Int { get set }
```

## Discussion

Discussion This property includes tick marks assigned to the minimum and maximum values. In its implementation of this property, the receiving NSSlider instance invokes the method of the same name of its NSSliderCell instance. By default, this value is 0, and no tick marks appear. The number of tick marks assigned to a slider, along with the slider’s minimum and maximum values, determines the values associated with the tick marks.

## See Also

### Managing tick marks

- [allowsTickMarkValuesOnly](appkit/nsslider/allowstickmarkvaluesonly.md)
- [closestTickMarkValue(toValue:)](appkit/nsslider/closesttickmarkvalue(tovalue:).md)
- [indexOfTickMark(at:)](appkit/nsslider/indexoftickmark(at:).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)
