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

# detachedViews

An array that contains the detached views from all the stack view’s gravity areas.

```
var detachedViews: [NSView] { get }
```

## Discussion

A view in a detached state is not present in the stack view’s view hierarchy, but it still consumes memory.

> Note:
> There is no guaranteed ordering of the views in the detached views array.

---

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)