<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSegmentedControl/SwitchTracking/momentary",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSSegmentSwitchTracking@NSSegmentSwitchTrackingMomentary"
  },
  "title" : "NSSegmentedControl.SwitchTracking.momentary"
}
-->

# NSSegmentedControl.SwitchTracking.momentary

A tracking mode that selects a segment when a person clicks within the bounds of the segment.

```
case momentary
```

## Discussion

A momentary segmented control sends an action when a person clicks a segment, and another action when the person releases the segment. If configured as continuous (see [`isContinuous`](/documentation/AppKit/NSControl/isContinuous)), the control also sends actions at repeating intervals until the person releases the segment, at which point the control sends its final action.

When the person clicks a segment, the [`selectedSegment`](/documentation/AppKit/NSSegmentedControl/selectedSegment) value is the index of the active segment. When the person releases the segment, the [`selectedSegment`](/documentation/AppKit/NSSegmentedControl/selectedSegment) value is `-1`.

This type of control is illustrated by the navigation segmented control in the Safari toolbar. When you click the back segment, for example, the previous webpage is displayed. This particular control is not configured as continuous. If it were, clicking and holding on the back segment would continue cycling through previous webpages until the segment is released.

---

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)