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

# usesRuler

A Boolean value that controls whether the text views sharing the receiver’s layout manager use a ruler.

```
var usesRuler: Bool { get set }
```

## Discussion

<doc://com.apple.documentation/documentation/Swift/true> to cause text views sharing the receiver’s layout manager to respond to [`NSRulerView`](/documentation/AppKit/NSRulerView) client messages and to paragraph-related menu actions, and update the ruler (when visible) as the selection changes with its paragraph and tab attributes, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## See Also

[`rangeForUserParagraphAttributeChange`](/documentation/AppKit/NSTextView/rangeForUserParagraphAttributeChange)

The range of characters affected by an action method that changes paragraph (not character) attributes.



---

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)