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

# knobRect(flipped:)

Returns the rectangle in which the slider knob is drawn.

```
func knobRect(flipped: Bool) -> NSRect
```

## Parameters

`flipped`

<doc://com.apple.documentation/documentation/Swift/true> if the coordinate system of the associated `NSSlider` or `NSMatrix` is flipped; otherwise <doc://com.apple.documentation/documentation/Swift/false>. You can determine whether this is the case by sending the `NSView` message [`isFlipped`](/documentation/AppKit/NSView/isFlipped) message to the `NSMatrix` or `NSSlider`.

## Return Value

The rectangle in which the knob is drawn, specified in the coordinate system of the `NSSlider` or `NSMatrix` with which the receiver is associated.

## Discussion

The knob rectangle depends on where in the slider the knob belongs—that is, it depends on the receiver’s minimum and maximum values and on the value the position of the knob will represent.

---

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)