NSViews
NSViews are the fundamental building blocks for user interfaces in AppKit, the macOS UI framework. An NSView represents a rectangular region within a window, participates in a view hierarchy, and is responsible for drawing, handling user input, performing layout, and managing subviews. Views are arranged in a superview–subview relationship and ultimately belong to a window’s content view. By default, AppKit uses a bottom-left coordinate origin, but subclasses can override isFlipped to adopt a top-left origin for compatibility with other toolkits.
Rendering and drawing are performed by subclasses that override drawRect:. The system marks regions as dirty
Event handling is a key role of NSView. Views receive mouse and keyboard input through methods such
Auto Layout integration is supported. NSView participates in constraints, and the translatesAutoresizingMaskIntoConstraints property controls whether the