<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSView/rulerView(_:shouldMove:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSView(im)rulerView:shouldMoveMarker:"
  },
  "title" : "rulerView(_:shouldMove:)"
}
-->

# rulerView(_:shouldMove:)

Requests permission for `aRulerView` to move `aMarker`.

```
func rulerView(_ ruler: NSRulerView, shouldMove marker: NSRulerMarker) -> Bool
```

## Discussion

If the client returns <doc://com.apple.documentation/documentation/Swift/true> the ruler view allows the user to move the marker; if the client returns <doc://com.apple.documentation/documentation/Swift/false> the marker doesn’t move.

The user’s ability to move a marker is typically set on the marker itself, using NSRulerMarker’s [`isMovable`](/documentation/AppKit/NSRulerMarker/isMovable) method. You should use this client view method only when the marker’s movability can vary depending on a variable condition (for example, if graphic items can be locked down to prevent them from being inadvertently moved).

---

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)