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

# verticalRulerView

The scroll view’s vertical ruler view.

```
var verticalRulerView: NSRulerView? { get set }
```

## Discussion

The value of this property is `nil` when the scroll view has no vertical ruler view.

If the scroll view is set to display a vertical ruler view and doesn’t yet have one, this property creates an instance of the ruler view class set using the class method `setRulerViewClass(_:)`. You can use this property to override the default ruler class set using the class method `setRulerViewClass(_:)`.

Display of rulers is controlled using the [`rulersVisible`](/documentation/AppKit/NSScrollView/rulersVisible) property.

---

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)