<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIStackView/addArrangedSubview(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIStackView(im)addArrangedSubview:"
  },
  "title" : "addArrangedSubview(_:)"
}
-->

# addArrangedSubview(_:)

Adds a view to the end of the arranged subviews array.

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

## Parameters

`view`

The view to add to the array of views arranged by the stack.

## Discussion

The stack view ensures that the [`arrangedSubviews`](/documentation/UIKit/UIStackView/arrangedSubviews) array is always a subset of its [`subviews`](/documentation/UIKit/UIView/subviews) array. This method automatically adds the provided view as a subview of the stack view, if it isn’t already. If the view is already a subview, this operation doesn’t alter the subview ordering.

## See Also

[`removeFromSuperview()`](/documentation/UIKit/UIView/removeFromSuperview())

Unlinks the view from its superview and its window, and removes it from the responder chain.

[`init(arrangedSubviews:)`](/documentation/UIKit/UIStackView/init(arrangedSubviews:))

Returns a new stack view object that manages the provided views.



---

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)