xcode 更改故事板上视图控制器的大小?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34619199/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:23:14  来源:igfitidea点击:

Change the size of a view controller on the storyboard?

xcodeviewcontroller

提问by Sean B

How can I change the size of a view controller in an Xcode Storyboard for editing purposes?

如何更改 Xcode Storyboard 中视图控制器的大小以进行编辑?

I have a bunch of elements in my storyboard and it would be much easier if I could make it bigger. I'm used to Photoshop and other graphical programs that let you increase the size to a more usable one.

我的故事板中有一堆元素,如果我能把它做得更大,那就容易多了。我习惯了 Photoshop 和其他图形程序,它们可以让您将大小增加到更有用的大小。

I can zoom it out to 100%, but I'd really like the size to be twice as big.

我可以将其缩小到 100%,但我真的希望尺寸能放大两倍。

Please note, I want to change the VIEWING size on View controller, NOT the actual size (Simulated Metrics, etc.)

请注意,我想更改视图控制器上的查看大小,而不是实际大小(模拟指标等)

PS. Yes, I know I can use accessibility settings and make my entire desktop larger, but that's a cheap fix to the problem.

附注。是的,我知道我可以使用辅助功能设置并使我的整个桌面更大,但这是解决问题的廉价方法。

回答by Ohmy

First click on View controller and select Size Inspector tab, in Simulated size select freeform and change the width and height.

首先单击 View controller 并选择 Size Inspector 选项卡,在 Simulated size 中选择 freeform 并更改宽度和高度。

enter image description here

在此处输入图片说明

I see you comment above about not wanting the above suggestion I posted (simulated>freeform). Do you mean 'use size classes' ? Size classes allows you to change to different iPhone or iPad sizes during your design to fit what you need. See picture below

我看到你在上面评论了不想要我发布的上述建议(模拟>自由格式)。您的意思是“使用尺寸等级”吗?尺寸等级允许您在设计期间更改为不同的 iPhone 或 iPad 尺寸以满足您的需要。见下图

enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明