You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of removing arrangedSubView is not great because even after removing arranged subView the view is still present. Remove arrangedSubView should work as expected.
A bonus would be if we can remove all the arrangedSubViews together. Some thing like -
@objc func removeAllArrangedSubViews() { for arrangedSubView in arrangedSubviews { removeArrangedSubview(arrangedSubView) arrangedSubView.removeFromSuperview() } updateConstraints() }
The text was updated successfully, but these errors were encountered:
The official UIStackView does not behave like that.
"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."
The current implementation of removing arrangedSubView is not great because even after removing arranged subView the view is still present. Remove arrangedSubView should work as expected.
A bonus would be if we can remove all the arrangedSubViews together. Some thing like -
@objc func removeAllArrangedSubViews() { for arrangedSubView in arrangedSubviews { removeArrangedSubview(arrangedSubView) arrangedSubView.removeFromSuperview() } updateConstraints() }
The text was updated successfully, but these errors were encountered: