A view that draws the text managed by back-end components and handles user events to select and modify its text.
- macOS 10.0+
NSText class is the front-end class to the AppKit text system. The class draws the text managed by the back-end components and handles user events to select and modify its text.
NSText is the principal means to obtain a text object that caters to almost all needs for displaying and managing text at the user interface level. While
NSText is a subclass of the
NSText class—which declares the most general Cocoa interface to the text system—
NSText adds major features beyond the capabilities of
You are more likely to use the
NSText class than the
NSText class. It is also important to remember that
NSText conforms to a large number of protocols, the methods of which are available to instances of the
To fully understand how to use this class, read Cocoa Text Architecture Guide and Text System User Interface Layer Programming Guide.