The options that determine how the view is resized relative to its superview.
SDK
- macOS 10.0+
Framework
- App
Kit
Declaration
var autoresizingMask: NSView.Autoresizing Mask { get set }
Discussion
The value of this property is an integer bit mask specified by combining the options described in NSView
. This mask is used by the resize(with
method when the view needs to be resized.
If the autoresizing mask is set to NSView
(that is, if none of the options are set), the view does not resize at all. When more than one option along an axis is set, the resize(with
method distributes the size difference as evenly as possible among the flexible portions. For example, if NSView
and NSView
are set and the superview’s width has increased by 10
points, the view’s frame and right margin are each widened by 5
points.