NSView Overview
The NSView class extends the event-handling capabilities of NSResponder to enable drawing and printing. NSView is an abstract class meaning that instances of NSView are seldom used directly. Instead, many subclasses of NSView exist to implement particular combinations of event handling and drawing behavior. Almost everything drawn in a Cocoa application is drawn by a subclass of NSView. For example, buttons, text fields, sliders, and even the backgrounds of windows are directly or indirectly subclasses of NSView. The most prominent subclasses of NSView include NSControl, NSText, NSTabView, NSSplitView, NSScrollView, and NSBox.
The NSView class cannot draw without the help of a window. When a view is drawn, it writes the data ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access