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

# addArrangedSubview(_:)

Adds the specified view to the end of the arranged subviews list.

```
func addArrangedSubview(_ view: NSView)
```

## Parameters

`view`

The view to add to the end of the [`arrangedSubviews`](/documentation/AppKit/NSStackView/arrangedSubviews) array.

## Discussion

The stack view ensures that the [`arrangedSubviews`](/documentation/AppKit/NSStackView/arrangedSubviews) array is always a subset of its [`subviews`](/documentation/AppKit/NSView/subviews) array. This method automatically adds the provided view as a subview of the stack view, if it is not already. If the view is already a subview, this operation does not alter the subview ordering.

---

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)