---
title: "addArrangedSubview(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsstackview/addarrangedsubview(_:)"
---

# addArrangedSubview(_:)

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

## Declaration

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

## Parameters

- `view`: The view to add to the end of the doc://com.apple.appkit/documentation/AppKit/NSStackView/arrangedSubviews array.

## Discussion

Discussion The stack view ensures that the arrangedSubviews array is always a subset of its 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.

## See Also

### Managing the Arranged Subviews

- [insertArrangedSubview(_:at:)](appkit/nsstackview/insertarrangedsubview(_:at:).md)
- [removeArrangedSubview(_:)](appkit/nsstackview/removearrangedsubview(_:).md)
- [arrangedSubviews](appkit/nsstackview/arrangedsubviews.md)
