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

# drawBar(inside:flipped:)

Draws the slider’s bar—but not its bezel or knob—inside the specified rectangle.

```
func drawBar(inside rect: NSRect, flipped: Bool)
```

## Parameters

`rect`

The bounds of the slider’s bar, not of its interior rectangle.

`flipped`

A Boolean value that indicates whether the cell’s control view—that is, the `NSSlider` or `NSMatrix` associated with the `NSSliderCell`—has a flipped coordinate system.

## Discussion

You should not call this method explicitly. It’s included so you can override it in a subclass.

---

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)