AutoLayout Size Classes - different proportional heights

橙三吉。 提交于 2019-12-04 15:00:44

You'll need to add a new constraint for Compact/Regular, and make sure the original one is only installed in Any/Any like so:

  • In Any/Any, add the original constraint (subview.height = superview.height * 0.33).
  • Switch to Compact/Regular, and select the previously added constraint.
  • In the size inspector, next to "installed", click the '+' button, and select Compact/Regular. Now You can disable "installed" in Compact/Regular (see pic).
  • Add the new constraint (subview.height = superview.height * 0.5), and make sure it's only installed in Compact/Regular mode.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!