Instance Method


Removes the provided view from the stack’s array of arranged subviews.


func removeArrangedSubview(_ view: UIView)



The view to be removed from the array of views arranged by the stack.


This method removes the provided view from the stack’s arrangedSubviews array. The view’s position and size will no longer be managed by the stack view. However, this method does not remove the provided view from the stack’s subviews array; therefore, the view is still displayed as part of the view hierarchy.

To prevent the view from appearing on screen after calling the stack’s removeArrangedSubview: method, explicitly remove the view from the subviews array by calling the view’s removeFromSuperview() method, or set the view’s isHidden property to true.

See Also

Managing Arranged Subviews

func addArrangedSubview(UIView)

Adds a view to the end of the arrangedSubviews array.

var arrangedSubviews: [UIView]

The list of views arranged by the stack view.

func insertArrangedSubview(UIView, at: Int)

Adds the provided view to the array of arranged subviews at the specified index.