xcode 故事板视图元素变灰

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

Storyboard View Elements Greyed Out

iosxcodeuistoryboardxcode6-beta7

提问by Alex Trott

I'm currently trying to edit a storyboard file, in Xcode 6 (not sure if this is an Xcode bug, or if i've just done something), and when I go to the view i want to edit this is what the scene shows me : Problem

我目前正在尝试在 Xcode 6 中编辑故事板文件(不确定这是 Xcode 错误,还是我刚刚做了一些事情),当我进入视图时,我想编辑这就是场景给我看: 问题

Is this something I've enabled accidentally? or if it's an Xcode problem. It first did this after I enabled source control for the project.

这是我不小心启用的东西吗?或者如果这是一个 Xcode 问题。在我为项目启用源代码管理后,它首先执行此操作。

Anyone have an idea on how to fix?

任何人都知道如何解决?

回答by Alladinian

The problem is probably related to Size Classes. If you have the option enabled make sure that the views were created for the size class that you have currently selected in IB (the grid thing).

该问题可能与大小类有关。如果您启用了该选项,请确保为您当前在 IB 中选择的尺寸类(网格事物)创建视图。

回答by jomo

If you want to make sure it works with any width and height, find the constraint:

如果您想确保它适用于任何宽度和高度,请找到约束:

wAny hR

任何人力资源

and remove it by clicking on the x, leaving only installedchecked:

并通过单击将其删除x,只保留installed选中状态:

wAny hAny

哇尼哈尼



I think Xcode will stop adding these automatically if you set the view to Any Width | Any Heightin the Storyboard:

如果您将视图设置为Any Width | Any Height在故事板中,我认为 Xcode 将停止自动添加这些:

storyboard bottom bar

故事板底部栏

回答by pkamb

Check that Installedis checked at the bottom of the Attributes Inspector

检查Installed在属性检查器底部检查

enter image description here

在此处输入图片说明