Xcode 4.3 未在 Size Inspector 中显示 Autoresizing 面板

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9370072/
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-14 23:22:46  来源:igfitidea点击:

Xcode 4.3 not presenting Autoresizing panel in Size Inspector

xcode

提问by PZX

In Xcode 4.3 I'm not seeing the "Autoresizing" panel (with the red crosshair things) in the Attributes Size Inspector.

在 Xcode 4.3 中,我在 Attributes Size Inspector 中没有看到“Autoresizing”面板(带有红色十字线)。

What I see instead are two panels, one titled "Content Hugging Priority" and the other titled "Content Compression Resistance Priority".

我看到的是两个面板,一个标题为“内容拥抱优先级”,另一个标题为“内容压缩阻力优先级”。

Other than baffling me, they seem to no effect on anything if I adjust their settings.

除了让我感到困惑之外,如果我调整它们的设置,它们似乎没有任何影响。

In projects started before 4.3 installation I still get the Autoresizing red line things, but for 4.3 created projects I am currently unable to control the location and size behavior of view controls.

在 4.3 安装之前启动的项目中,我仍然得到 Autoresizing 红线的东西,但是对于 4.3 创建的项目,我目前无法控制视图控件的位置和大小行为。

回答by ThomasW

For Xcode 4.3 auto layout is enabled by default. To disable deselect the "use auto layout" option in the file inspector tab.

对于 Xcode 4.3,默认情况下启用自动布局。禁用取消选择文件检查器选项卡中的“使用自动布局”选项。

file inspector tab

文件检查器选项卡

https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Chapters/xcode_4_0.html#//apple_ref/doc/uid/TP40016147-SW2

https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Chapters/xcode_4_0.html#//apple_ref/doc/uid/TP40016147-SW2

回答by Rich4321

In Xcode 4.5 you need to go to file inspector to uncheck the Use Autolayout, then go back to Size inspector, the good old Autosizing is back where it was. :) Don't you just hate that when then change things like that behind your back, precisely what Microsoft would do!

在 Xcode 4.5 中,您需要转到文件检查器取消选中 Use Autolayout,然后返回到 Size 检查器,旧的 Autosizing 又回到了原来的位置。:) 当你在背后改变这样的事情时,你不只是讨厌,这正是微软会做的!