Instance Method


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


- (instancetype)initWithArrangedSubviews:(NSArray<__kindof UIView *> *)views;



The views to be arranged by the stack view.

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.


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

Initializing a Stack View