<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIView/AutoresizingMask-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@E@UIViewAutoresizing"
  },
  "title" : "UIView.AutoresizingMask"
}
-->

# UIView.AutoresizingMask

Options for automatic view resizing.

```
struct AutoresizingMask
```

## Topics

### Constants

[`UIViewAutoresizingNone`](/documentation/UIKit/UIViewAutoresizing/UIViewAutoresizingNone)

The option for indicating that the view does not resize.

[`static var flexibleLeftMargin: UIView.AutoresizingMask`](/documentation/UIKit/UIView/AutoresizingMask-swift.struct/flexibleLeftMargin)

Resizing performed by expanding or shrinking a view in the direction of the left margin.

[`static var flexibleWidth: UIView.AutoresizingMask`](/documentation/UIKit/UIView/AutoresizingMask-swift.struct/flexibleWidth)

Resizing performed by expanding or shrinking a view’s width.

[`static var flexibleRightMargin: UIView.AutoresizingMask`](/documentation/UIKit/UIView/AutoresizingMask-swift.struct/flexibleRightMargin)

Resizing performed by expanding or shrinking a view in the direction of the right margin.

[`static var flexibleTopMargin: UIView.AutoresizingMask`](/documentation/UIKit/UIView/AutoresizingMask-swift.struct/flexibleTopMargin)

Resizing performed by expanding or shrinking a view in the direction of the top margin.

[`static var flexibleHeight: UIView.AutoresizingMask`](/documentation/UIKit/UIView/AutoresizingMask-swift.struct/flexibleHeight)

Resizing performed by expanding or shrinking a view’s height.

[`static var flexibleBottomMargin: UIView.AutoresizingMask`](/documentation/UIKit/UIView/AutoresizingMask-swift.struct/flexibleBottomMargin)

Resizing performed by expanding or shrinking a view in the direction of the bottom margin.

### Initializers

[`init(rawValue: UInt)`](/documentation/UIKit/UIView/AutoresizingMask-swift.struct/init(rawValue:))

Creates an autoresizing mask structure with the specified raw value.

## Relationships

### Conforms To

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

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

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

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

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

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

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

[`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)