The gravity areas available in a stack view.
- macOS 10.9+
The layout of a stack view is partitioned into three distinct areas in which you can place views. These are known as gravity areas. You can use these constants to configure a stack view by way of the
In a horizontally oriented stack view, the three gravity areas are
NSStack. The ordering of these areas depends on the user interface language, unless you’ve explicitly specified the stack view’s user interface layout direction by calling the inherited
user method. For a
user property value of
NSUser, the leading gravity area is on the left.
In a vertically oriented stack view, the three gravity areas are always
The center gravity area is constrained to remain geometrically centered with an Auto Layout priority of
NSLayout. For information about geometric spacing between gravity areas, see the description of the