Changing the multiplier of a constraint based on size class

后端 未结 2 1473
忘掉有多难
忘掉有多难 2021-02-20 08:59

Is it possible to give a constraint a different multiplier depending on the current size class?

I have a view that I want to be half the size of the screen for a regular

2条回答
  •  时光取名叫无心
    2021-02-20 09:33

    I was able to provide different multipliers for each size class by selecting the element (whose constraint needs to be changed)-> size inspector -> constraints select "All" instead of "This Size Class" -> This will show the constraints of both the current size class with the constraints of the unselected size class greyed out. Right-click on the desired constraint (common constraints show up in both size classes) you can change the multiplier values for both the size class constraints.

提交回复
热议问题