I\'m really very weak in constraints part of ios. I have gone through many reference link as shown below but still not able solve my issue.
Hide autolayout UIView : How
I use outlets for constraints set on the storyboard, for divs between buttons (using old ways to set dynamic layouts). So, for large screens (iPhone 6 and above), I update the values of fixed heights (app only viewed in portrait mode). What worked for me is:
constHeightlogo.constant = 140 //old value = 72
///set any other updates here then force the view
self.view.layoutIfNeeded()
Worked like a charm.
See related here:
Update the constant property of a constraint programmatically in Swift?
just make the outlet of height of both UIView and use constant property to change the height constraints like...
if conditionfails{
heightconstOfView1.constant = 0
}
else{
heightconstOfView2.constant = 0
}