NSViewController
NSViewController is a controller class in Apple's AppKit that manages a root NSView and coordinates a portion of a macOS application's user interface. It serves as the macOS counterpart to UIKit's UIViewController, and is used to encapsulate the behavior and data associated with a view hierarchy. An NSViewController owns a view via its view property, which is loaded from a nib/storyboard or created programmatically in loadView. The representedObject property can hold a model object associated with the view.
During its lifecycle, an NSViewController is typically instantiated from a storyboard or programmatically, and its view
Containment enables complex interfaces by composing multiple view controllers. An NSViewController can become a child of
NSViewController interacts with other AppKit components such as NSWindowController and NSStoryboard, and can transfer data via