<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSView/removeLayoutGuide(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSView(im)removeLayoutGuide:"
  },
  "title" : "removeLayoutGuide(_:)"
}
-->

# removeLayoutGuide(_:)

Removes the provided layout guide from the view.

```
func removeLayoutGuide(_ guide: NSLayoutGuide)
```

## Parameters

`guide`

The layout guide to be removed.

## Discussion

This method removes the provided layout guide from the view’s [`layoutGuides`](/documentation/AppKit/NSView/layoutGuides) array. It also sets the guide’s [`owningView`](/documentation/AppKit/NSLayoutGuide/owningView) property to `nil`. Finally, it removes any constraints to the layout guide.

Layout guides cannot participate in Auto Layout constraints unless they are added by a view in the view hierarchy.

---

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)