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

# closestTickMarkValue(toValue:)

Returns the value of the tick mark closest to the specified value.

```
func closestTickMarkValue(toValue value: Double) -> Double
```

## Parameters

`value`

The value for which to return the closest tick mark.

## Return Value

The value of the tick mark closest to `aValue`.

## Discussion

In its implementation of this method, the slider 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)