removeArrangedSubview(_:)
Removes the provided view from the stack’s array of arranged subviews.
Declaration
func removeArrangedSubview(_ view: UIView)Parameters
- view:
The view to be removed from the array of views arranged by the stack.
Discussion
This method removes the provided view from the stack’s arrangedSubviews array. The stack view no longer manages the view’s position and size. However, this method doesn’t 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.