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

# reservedThicknessForAccessoryView

The room available for the receiver’s accessory view to `thickness`.

```
var reservedThicknessForAccessoryView: CGFloat { get set }
```

## Discussion

If the ruler is horizontal, `thickness` is the height of the accessory view; otherwise, it’s the width. NSRulerViews by default reserve no space for an accessory view.

An NSRulerView automatically increases the reserved thickness as necessary to that of the accessory view. When the accessory view is thinner than the reserved space, it’s centered in that space. If you plan to use several accessory views of different sizes, you should set the reserved thickness beforehand to that of the thickest accessory view, in order to avoid retiling of the NSScrollView.

## See Also

[`accessoryView`](/documentation/AppKit/NSRulerView/accessoryView)

The receiver’s accessory view to `aView`.



---

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)