Sets the selection to the characters in an array of ranges in response to user action.
- macOS 10.4+
A non-nil, non-empty array of objects responding to the NSValue
rangemethod. The ranges in the
rangesarray must begin and end on glyph boundaries and not split base glyphs and their nonspacing marks.
The selection affinity for the selection. See
selectionfor more information about how affinities work.
YESto behave appropriately for a continuing selection where the user is still dragging the mouse,
YES, the receiver doesn’t send notifications or remove the marking from its marked text. If
NO, the receiver posts an
NSTextto the default notification center and removes the marking from marked text if the new selection is greater than the marked region.
View Did Change Selection Notification
This method also resets the selection granularity to