---
title: "rulerView(_:shouldMove:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsview/rulerview(_:shouldmove:)"
---

# rulerView(_:shouldMove:)

Requests permission for aRulerView to move aMarker.

## Declaration

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

## Discussion

Discussion If the client returns true the ruler view allows the user to move the marker; if the client returns 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 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).

## See Also

### Synchronizing with Ruler Views

- [rulerView(_:didAdd:)](appkit/nsview/rulerview(_:didadd:).md)
- [rulerView(_:didMove:)](appkit/nsview/rulerview(_:didmove:).md)
- [rulerView(_:didRemove:)](appkit/nsview/rulerview(_:didremove:).md)
- [rulerView(_:handleMouseDownWith:)](appkit/nsview/rulerview(_:handlemousedownwith:).md)
- [rulerView(_:locationFor:)](appkit/nsview/rulerview(_:locationfor:).md)
- [rulerView(_:pointForLocation:)](appkit/nsview/rulerview(_:pointforlocation:).md)
- [rulerView(_:shouldAdd:)](appkit/nsview/rulerview(_:shouldadd:).md)
- [rulerView(_:shouldRemove:)](appkit/nsview/rulerview(_:shouldremove:).md)
- [rulerView(_:willAdd:atLocation:)](appkit/nsview/rulerview(_:willadd:atlocation:).md)
- [rulerView(_:willMove:toLocation:)](appkit/nsview/rulerview(_:willmove:tolocation:).md)
- [rulerView(_:willSetClientView:)](appkit/nsview/rulerview(_:willsetclientview:).md)
