---
title: "init(arrangedSubviews:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uistackview/init(arrangedsubviews:)"
---

# init(arrangedSubviews:)

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

## Declaration

```swift
convenience init(arrangedSubviews views: [UIView])
```

## Parameters

- `views`: The views to be arranged by the stack view.

## Return Value

Return Value A new stack view object. This stack view contains and lays out the provided views in a single stack. You can modify the orientation or appearance of this stack, using the stack view’s properties.

## Discussion

Discussion The stack view adds all the arranged views to its arrangedSubviews array. It also adds these views as subviews. If any view contained in the arrangedSubviews array receives a removeFromSuperview() method call, the stack view also removes it from the arrangedSubviews.

## See Also

### Related Documentation

- [insertArrangedSubview(_:at:)](uikit/uistackview/insertarrangedsubview(_:at:).md)
- [removeFromSuperview()](uikit/uiview/removefromsuperview().md)
- [arrangedSubviews](uikit/uistackview/arrangedsubviews.md)
- [addArrangedSubview(_:)](uikit/uistackview/addarrangedsubview(_:).md)
- [removeArrangedSubview(_:)](uikit/uistackview/removearrangedsubview(_:).md)

### Initializing a stack view

- [init(frame:)](uikit/uistackview/init(frame:).md)
- [init(coder:)](uikit/uistackview/init(coder:).md)
