leaner122 leaner122 - 2 months ago 13
iOS Question

How to set subview height constraints for different size classes

This is how I have set subview height in regards to superview.I have set constraints for

compact width
and
regular height
class as
View.height = 0.5xheight
. I want to set
View.height = 0.25xheight
for
regular width
and
regular height
class.

enter image description here

So basically I want to change multiplier to 0.25 for
regular width
and
regular height
class. But I did not find any option to do that. So how can I do this.

Answer

Just go to Main.Storyboard and select your size class, here View as: iPad Pro (wR hR) and adjust size of your subview and update the constraints.

Comments