<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UILayoutPriority",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@T@UILayoutPriority"
  },
  "title" : "UILayoutPriority"
}
-->

# UILayoutPriority

The layout priority is used to indicate to the constraint-based layout system which constraints are more important, allowing the system to make appropriate tradeoffs when satisfying the constraints of the system as a whole.

```
struct UILayoutPriority
```

## Topics

### Constants

[`UILayoutPriorityRequired`](/documentation/UIKit/UILayoutPriority/required)

A required constraint.

[`UILayoutPriorityDefaultHigh`](/documentation/UIKit/UILayoutPriority/defaultHigh)

The priority level with which a button resists compressing its content.

[`UILayoutPriorityDragThatCanResizeScene`](/documentation/UIKit/UILayoutPriority/dragThatCanResizeScene)

The priority level for a drag that may end up resizing the window’s scene.

[`UILayoutPrioritySceneSizeStayPut`](/documentation/UIKit/UILayoutPriority/sceneSizeStayPut)

The priority level at which the window’s scene prefers to stay the same size.

[`UILayoutPriorityDragThatCannotResizeScene`](/documentation/UIKit/UILayoutPriority/dragThatCannotResizeScene)

The priority level for a drag that won’t resize the window’s scene.

[`UILayoutPriorityDefaultLow`](/documentation/UIKit/UILayoutPriority/defaultLow)

The priority level at which a button hugs its contents horizontally.

[`UILayoutPriorityFittingSizeLevel`](/documentation/UIKit/UILayoutPriority/fittingSizeLevel)

The priority level with which the view wants to conform to the target size in that computation.

### Initializers

[`init(_:)`](/documentation/UIKit/UILayoutPriority/init(_:))

Creates a layout priority structure.

[`init(rawValue:)`](/documentation/UIKit/UILayoutPriority/init(rawValue:))

Creates a layout priority structure with the specified raw value.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

---

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)