How to hide a button from a horizontal stack view in swift

481 Views Asked by At

I want to hide one of the button from a horizontal stack view. First I tried to do

button1.isHidden = true

That didn't hide the button. Then I tried

horizontakStackView.removeArrangedSubview(button1)
button1.removeFromSuperview()

but still the button was showing in the screen. I was only able to hide the entire stackview. How can hide specific elements inside a stackview? Please help me

0

There are 0 best solutions below