These are my codes //My UIViews
@IBOutlet weak var UIVIewFirst: UIView!
@IBOutlet weak var UIViewSecond: UIView!
@IBOutlet weak var UIViewThird: UIView!
@IBOutlet weak var middleViewHeightConstraint: NSLayoutConstraint!
@IBOutlet weak var ViewThirdHeight: NSLayoutConstraint!
There is a button to show and hide the view as;
@IBAction func infoClicked(sender: SSRadioButton) {
if UIViewSecond.hidden {
sender.selected = false
UIViewSecond.hidden = false
self.middleViewHeightConstraint.constant = 134
} else {
sender.selected = true
UIViewSecond.hidden = true
self.middleViewHeightConstraint.constant = 0
self.ViewThirdHeight.constant = 180
}
}
the vertical gap between each view is 10. After hiding the view the gap becomes 20. But i need it to set it 10 between third and second view. Even though i set the third view height constant to any number it does not changes it position.Can anyone suggest why is this happening??