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

# layoutMarginsGuide

A layout guide that provides the recommended amount of padding for content inside of a view.

```
var layoutMarginsGuide: NSLayoutGuide { get }
```

## Discussion

To ensure you pad your view’s content by the correct amount, constrain against the anchors of the layout margins guide on all sides. The system automatically updates the guide when a view becomes the content view.

For views that aren’t the content view, the layout margins guide is equivalent to the system’s standard spacing from the safe area.

---

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)