NSTextView class is the front-end class to the Application Kit’s text system. The class draws the text managed by the back-end components and handles user events to select and modify its text.
NSTextView 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
NSTextView is a subclass of the
NSText class—which declares the most general Cocoa interface to the text system—
NSTextView adds major features beyond the capabilities of
- macOS 10.10+
Your applications will use the
NSTextView class over the
NSText class. It is also important to remember that NSTextView conforms to a large number of protocols as listed above. The methods of these protocols are available to instances of the
Be sure to read Cocoa Text Architecture Guide and Text System User Interface Layer Programming Guide to fully understand how to use this class.