<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "tvOS: 14.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIBackgroundConfiguration-swift.struct/edgesAddingLayoutMarginsToBackgroundInsets",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit25UIBackgroundConfigurationV42edgesAddingLayoutMarginsToBackgroundInsetsSo21NSDirectionalRectEdgeVvp"
  },
  "title" : "edgesAddingLayoutMarginsToBackgroundInsets"
}
-->

# edgesAddingLayoutMarginsToBackgroundInsets

The edges on which the configuration adds the containing view’s layout margins to the background insets.

```
var edgesAddingLayoutMarginsToBackgroundInsets: NSDirectionalRectEdge { get set }
```

## Discussion

For the specified edges, the [`backgroundInsets`](/documentation/UIKit/UIBackgroundConfiguration-swift.struct/backgroundInsets) values are relative to the containing view’s layout margins.

The default value is [`NSDirectionalRectEdgeNone`](/documentation/UIKit/NSDirectionalRectEdge/NSDirectionalRectEdgeNone).

---

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)