selectionManager(_:shouldBeginSelectionAt:)
Asks the delegate whether a selection can begin at the specified point.
Declaration
optional func selectionManager(_ selectionManager: NSTextSelectionManager, shouldBeginSelectionAt point: NSPoint) -> BoolParameters
- selectionManager:
The selection manager requesting permission.
- point:
The point in the view’s coordinate system where the selection gesture began.
Return Value
YES if selection can begin at the point; otherwise, NO.
Discussion
Return YES to allow a text selection to begin at the specified point, NO to prevent it. If the delegate doesn’t implement this method, selection is always allowed. The selection manager calls this method when the user initiates a selection gesture at the given point in the coordinate system of the view containing the selection manager.