Contents

NSTextSelectionManager

An object that coordinates text selection behavior for custom text views.

Declaration

@MainActor class NSTextSelectionManager

Overview

NSTextSelectionManager provides a centralized way to manage text selection interactions using a set of gesture recognizers. For keyboard-based selection, integrate NSTextSelectionNavigation with your view. The selection manager works with a delegate to update and respond to selection changes, and with a data source to query the text layout system.

Topics

Setting a delegate

Configuring text selection

Managing gesture recognizers

See Also

Location and selection