I have 4 separate views and I want to hide the other 3 of them when one of the buttons is pressed.
I have them in a UIStackView but .isHidden = true
does not hide the views for some reason.
It works fine when they're not in a stack view.
@IBAction func qbpressed(_ sender: Any) {
QBContainer.isHidden = false
WRContainer.isHidden = true
RBContainer.isHidden = true
QBIndicator.isHidden = false
WRIndicator.isHidden = true
RBIndicator.isHidden = true
TEIndicator.isHidden = true
QBButton.setTitleColor(#colorLiteral(red: 0, green: 0.5008062124, blue: 1, alpha: 1), for: .normal)
WRButton.setTitleColor(#colorLiteral(red: 0.7540688515, green: 0.7540867925, blue: 0.7540771365, alpha: 1), for: .normal)
RBButton.setTitleColor(#colorLiteral(red: 0.7540688515, green: 0.7540867925, blue: 0.7540771365, alpha: 1), for: .normal)
TEButton.setTitleColor(#colorLiteral(red: 0.7540688515, green: 0.7540867925, blue: 0.7540771365, alpha: 1), for: .normal)
if intersitial.isReady{
intersitial.present(fromRootViewController: self)
}
}
A streamlined interface for laying out a collection of views in either a column or a row.
In order to delete a Stack View, two methods: (A) (1) open the navigator then the outline view; (2) select the Stack View that we want to delete/remove (see select the Stack View); (3) In the top Xcode tool banner click Editor then Unembed.
isHidden property doesn't work, but you can use alpha and achieve the same result,
QBIndicator.alpha = 1.0
will work for QBIndicator.isHidden = false
and
QBIndicator.alpha = 0.0
will work for QBIndicator.isHidden = true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With