---
title: detachedViews
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsstackview/detachedviews
---

# detachedViews

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

## Declaration

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

## Discussion

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.

## See Also

### Inspecting a Stack View

- [views](appkit/nsstackview/views.md)
- [views(in:)](appkit/nsstackview/views(in:).md)
- [clippingResistancePriority(for:)](appkit/nsstackview/clippingresistancepriority(for:).md)
- [huggingPriority(for:)](appkit/nsstackview/huggingpriority(for:).md)
