---
title: "rulerView(_:didMove:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextview/rulerview(_:didmove:)"
---

# rulerView(_:didMove:)

Modifies the paragraph style of the paragraphs containing the selection to record the new location of the marker.

## Declaration

```swift
func rulerView(_ ruler: NSRulerView, didMove marker: NSRulerMarker)
```

## Parameters

- `ruler`: The ruler view sending the message.
- `marker`: The marker that was moved.

## Discussion

Discussion This method records the change by invoking didChangeText() after moving the marker. NSTextView checks for permission to make the change in its rulerView(_:shouldMove:) method, which invokes shouldChangeText(in:replacementString:) to send out the proper request and notifications, and only invokes this method if permission is granted.

## See Also

### Related Documentation

- [representedObject](appkit/nsrulermarker/representedobject.md)

### Supporting the ruler view

- [rulerView(_:willMove:toLocation:)](appkit/nstextview/rulerview(_:willmove:tolocation:).md)
- [rulerView(_:shouldMove:)](appkit/nstextview/rulerview(_:shouldmove:).md)
- [rulerView(_:didRemove:)](appkit/nstextview/rulerview(_:didremove:).md)
- [rulerView(_:shouldRemove:)](appkit/nstextview/rulerview(_:shouldremove:).md)
- [rulerView(_:didAdd:)](appkit/nstextview/rulerview(_:didadd:).md)
- [rulerView(_:shouldAdd:)](appkit/nstextview/rulerview(_:shouldadd:).md)
- [rulerView(_:willAdd:atLocation:)](appkit/nstextview/rulerview(_:willadd:atlocation:).md)
- [rulerView(_:handleMouseDownWith:)](appkit/nstextview/rulerview(_:handlemousedownwith:).md)
