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

# doubleValueForSelectedSegment

When the tracking mode for the control is set to use a momentary accelerator, returns a value for the selected segment.

```
var doubleValueForSelectedSegment: Double { get }
```

## Return Value

The value of the selected segment interpreted as a double-precision floating-point number.

## Discussion

This method is intended for use with controls whose tracking mode is set to [`NSSegmentedControl.SwitchTracking.momentaryAccelerator`](/documentation/AppKit/NSSegmentedControl/SwitchTracking/momentaryAccelerator). An assertion will occur if this method is called for other types of segmented controls.

## See Also

[`NSSegmentedControl.SwitchTracking.momentaryAccelerator`](/documentation/AppKit/NSSegmentedControl/SwitchTracking/momentaryAccelerator)

A tracking mode that sends repeating actions as pressure changes on Force Touch systems, stopping when someone releases the segment.

[`trackingMode`](/documentation/AppKit/NSSegmentedControl/trackingMode)

The type of tracking behavior the control exhibits.



---

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)