[英]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
. 这就是我就
View.height = 0.5xheight
设置子视图高度的方式。我已经将compact width
和regular height
类的约束设置为View.height = 0.5xheight
。 I want to set View.height = 0.25xheight
for regular width
and regular height
class. 我想为
regular width
和regular height
类设置View.height = 0.25xheight
。
So basically I want to change multiplier to 0.25 for regular width
and regular height
class. 所以基本上我想将
regular width
和regular height
乘数更改为0.25。 But I did not find any option to do that. 但是我没有找到任何选择。 So how can I do this.
所以我该怎么做。
只需转到Main.Storyboard
并选择尺寸类别,即可在此处View as: iPad Pro (wR hR)
并调整子视图的尺寸并更新约束。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.