A ruler and the markers above or to the side of a scroll view’s document view.
SDK
- macOS 10.0+
Framework
- App
Kit
Declaration
class NSRulerView : NSView
Overview
Views within the scroll view can become clients of the ruler view, having it display markers for their elements, and receiving messages from the ruler view when the user manipulates the markers.
Principal Attributes
Displays markers that represent elements of the client view.
Displays in arbitrary units.
Provides for an accessory view containing extra controls.
Creation
has
(Horizontal Ruler NSScroll
)View has
(Vertical Ruler NSScroll
)View -
init(scroll
Designated initializer.View: orientation:)
Commonly Used Methods
client
View Changes the ruler’s client view.
markers
Sets the markers displayed by the ruler view.
accessory
View Sets the accessory view.
track
Marker(_: with Mouse Event:) Allows the user to add a new marker.
Overview
See NSRulerMarkerClientViewDelegation for delegate methods that may be of interest.