<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSlider/allowsTickMarkValuesOnly",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSlider(py)allowsTickMarkValuesOnly"
  },
  "title" : "allowsTickMarkValuesOnly"
}
-->

# allowsTickMarkValuesOnly

A Boolean value that indicates whether the slider fixes its values to those values represented by its tick marks.

```
var allowsTickMarkValuesOnly: Bool { get set }
```

## Discussion

This value is <doc://com.apple.documentation/documentation/Swift/true> if the slider fixes its values to the values represented by its tick marks; otherwise it’s <doc://com.apple.documentation/documentation/Swift/false>. For example, if a slider has a minimum value of `0`, a maximum value of `100`, and five markers, the allowable values are `0`, `25`, `50`, `75`, and `100`. When users move the slider’s knob, it jumps to the tick mark nearest the cursor when the mouse button is released. This method has no effect if the slider has no tick marks. In its implementation of this method, the receiving `NSSlider` instance invokes the method of the same name of its `NSSliderCell` instance.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)