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

# owningView

The view that owns this layout guide.

```
weak var owningView: NSView? { get set }
```

## Discussion

By default, this property is `nil`.  To participate in Auto Layout, the layout guide must be added to a view by calling its [`addLayoutGuide(_:)`](/documentation/AppKit/NSView/addLayoutGuide(_:)) method. Do not modify this property directly. Instead, use the view’s [`addLayoutGuide(_:)`](/documentation/AppKit/NSView/addLayoutGuide(_:)) and [`removeLayoutGuide(_:)`](/documentation/AppKit/NSView/removeLayoutGuide(_:)) methods, which update this property as necessary.

---

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)