Sets the Auto Layout priority for a view to remain attached to the stack view when Auto Layout reduces the stack view’s size.
- macOS 10.9+
The visibility priority for a specified view. Valid values are those in the
View .Visibility Priority
The view whose visibility priority you are setting.
When Auto Layout reduces the stack view’s size (such as when a user reduces the size of the window containing the stack view), causing one or more views to no longer fit, the stack view detaches views in order of increasing visibility priority. A view with lower visibility priority detaches before a view with higher visibility priority. A set of views with identical, detachable visibility priority are all detached or reattached together. A view with the highest possible visibility priority never detaches.
A view in a detached state is not present in the stack view’s view hierarchy, but it still consumes memory.
The default visibility priority for a view is
NSStack, resulting in the view never detaching.
To allow a view to detach as needed by the stack view, set a visibility priority of
NSStack. To force a view to detach regardless of the enclosing view’s size, set a visibility priority of
NSStack. To explicitly reattach a view to a stack view, set a visibility priority of