The view that is the parent of the current view.
- macOS 10.0+
The superview is the immediate ancestor of the current view. The value of this property is
nil when the view is not installed in a view hierarchy. To set the value of this property, use the
add method to embed the current view inside another view.
When checking the value of this property iteratively or recursively, be sure to compare the superview object to the content view of the window to avoid proceeding out of the view hierarchy.