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)
}
}
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