Contents

rulerView(_:shouldMove:)

Returns whether the marker should be moved.

Declaration

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

Parameters

  • ruler:

    The ruler view sending the message.

  • marker:

    The marker to be moved.

Return Value

true if aMarker can be moved, false otherwise.

Discussion

This method controls whether an existing marker aMarker can be moved. The receiver checks for permission to make the change by invoking shouldChangeText(in:replacementString:) and returning the return value of that message. If the change is allowed, the receiver is then sent a rulerView(_:didMove:) message.

See Also

Supporting the ruler view