<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSView/AutoresizingMask-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSAutoresizingMaskOptions"
  },
  "title" : "NSView.AutoresizingMask"
}
-->

# NSView.AutoresizingMask

Constants that specify the autoresizing behaviors for views.

```
struct AutoresizingMask
```

## Topics

### Getting the Autoresizing mask

[`NSViewNotSizable`](/documentation/AppKit/NSView/AutoresizingMask-swift.struct/none)

The view cannot be resized.

[`NSViewMinXMargin`](/documentation/AppKit/NSView/AutoresizingMask-swift.struct/minXMargin)

The left margin between the view and its superview is flexible.

[`NSViewWidthSizable`](/documentation/AppKit/NSView/AutoresizingMask-swift.struct/width)

The view’s width is flexible.

[`NSViewMaxXMargin`](/documentation/AppKit/NSView/AutoresizingMask-swift.struct/maxXMargin)

The right margin between the view and its superview is flexible.

[`NSViewMinYMargin`](/documentation/AppKit/NSView/AutoresizingMask-swift.struct/minYMargin)

The bottom margin between the view and its superview is flexible.

[`NSViewHeightSizable`](/documentation/AppKit/NSView/AutoresizingMask-swift.struct/height)

The view’s height is flexible.

[`NSViewMaxYMargin`](/documentation/AppKit/NSView/AutoresizingMask-swift.struct/maxYMargin)

The top margin between the view and its superview is flexible.

### Creating an Autoresizing Mask

[`init(rawValue:)`](/documentation/AppKit/NSView/AutoresizingMask-swift.struct/init(rawValue:))

## Relationships

### Conforms To

[`SetAlgebra`](/documentation/Swift/SetAlgebra)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`OptionSet`](/documentation/Swift/OptionSet)

[`ExpressibleByArrayLiteral`](/documentation/Swift/ExpressibleByArrayLiteral)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

---

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)