Meri
Meri

Reputation: 67

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

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

Upvotes: 0

Views: 598

Answers (0)

Related Questions