<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSView/autoresizingMask-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSView(py)autoresizingMask"
  },
  "title" : "autoresizingMask"
}
-->

# autoresizingMask

The options that determine how the view is resized relative to its superview.

```
var autoresizingMask: NSView.AutoresizingMask { get set }
```

## Discussion

The value of this property is an integer bit mask specified by combining the options described in [`NSView.AutoresizingMask`](/documentation/AppKit/NSView/AutoresizingMask-swift.struct). This mask is used by the [`resize(withOldSuperviewSize:)`](/documentation/AppKit/NSView/resize(withOldSuperviewSize:)) method when the view needs to be resized.

If the autoresizing mask is set to `NSViewNotSizable` (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(withOldSuperviewSize:)`](/documentation/AppKit/NSView/resize(withOldSuperviewSize:)) method distributes the size difference as evenly as possible among the flexible portions. For example, if `NSViewWidthSizable` and `NSViewMaxXMargin` are set and the superview’s width has increased by `10.0` points, the view’s frame and right margin are each widened by `5.0` points.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)