Contents

rulerView(_:didMove:)

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

Declaration

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

Parameters

  • ruler:

    The ruler view sending the message.

  • marker:

    The marker that was moved.

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

Supporting the ruler view