简体   繁体   English

iPad尺寸类未显示iPhone尺寸调用元素和约束iOS

[英]iPad size class not showing iPhone size call elements and constraints iOS

I've a project where pervious developer has built whole app UI in universal storyboard, but has only added UI elements and constraints for iPhone size class. 我有一个项目,以前的开发人员已在通用情节提要中构建了整个应用程序UI,但仅为iPhone size类添加了UI元素和约束。
So when I run app on iPad it shows nothing. 因此,当我在iPad上运行应用程序时,它什么也没显示。 Storyboard also not showing anything for iPad size classes when I change it from iPhone to iPad using this: 当我使用以下方法将Storyboard从iPhone更改为iPad时,Storyboard也不会显示iPad尺寸类的任何内容: 在此处输入图片说明

I found a way to add UI elements to iPad size classes by installing it to universal size classes by clicking Installed button: 我找到了一种方法,可以通过单击“ 安装”按钮将UI元素安装到通用尺寸类别中,从而将其添加到iPad尺寸类别中:

在此处输入图片说明

And can add constraints using this: 并可以使用以下方法添加约束:

在此处输入图片说明

But I need do this for each and every UI element and every constraint. 但是我需要为每个UI元素和每个约束执行此操作。 Is there any other way to handle this? 还有其他方法可以解决吗?

You can decide to have a constraint installed for all sizes or not installed at all, or you can specify for which sizes you want the constraints to be installed, but then you need to choose the ones yourself. 您可以决定为所有大小安装约束,或者根本不安装约束,也可以指定要为哪些大小安装约束,但随后需要自己选择约束。 You can shift or command select several at once and then set the installed properties for all the selected ones together. 您可以一次移位或命令选择多个,然后一起为所有选定的属性设置安装的属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM