简体   繁体   English

Interface Builder视图未显示

[英]Interface Builder Views not showing up

All of my view controllers suddenly had this bug. 我的所有视图控制器都突然出现了这个错误。 Nothing shows up in interface builder, but it works fine when I run it. 在界面构建器中没有显示任何内容,但在运行它时它可以正常工作。 This makes it so I can't edit my views in interface builder. 这使得我无法在界面构建器中编辑我的视图。 Whats going on here? 这里发生了什么? Xcode 6.1 GM ios 8.1 B1. Xcode 6.1 GM ios 8.1 B1。 Swift. 迅速。 在此输入图像描述

I assume you made your design in a size class other than wAny / hAny. 我假设你的设计是在wAny / hAny以外的尺寸等级。 Switch back to the size class you used for design and your controls will reappear. 切换回您用于设计的尺寸等级,您的控件将重新出现。

This happens when you press Command+Delete, meant for removing objects from only certain size classes. 当您按下Command + Delete时会发生这种情况,这意味着仅从特定大小的类中删除对象。 If you just did it, you can undo it, but otherwise I looked around and I can't find a way to turn them back on. 如果你刚刚做了,你可以撤消它,但除此之外我环顾四周,我找不到办法让它们重新开启。 The only menu references to it are after you press Command+Delete to "Undo Turn Off", so it may be a bug right now unless theres an alternative way to turn the layers back on. 唯一的菜单引用是在你按下Command + Delete后“撤消关闭”,所以它现在可能是一个bug,除非是另一种方法来重新打开图层。

I also encountered similar problems.And I solve this problem by check install... 我也遇到过类似的问题。我通过check install解决了这个问题...

截图

我相信哈里森是正确的,左边的灰色视图意味着他们已被删除特定大小的类,尝试更改大小类,看看他们是否在不同大小的类中是活跃的

Thank you all for the help. 谢谢大家的帮助。 I had designed the views in regular regular and then changed it to any any unknowingly. 我经常定期设计视图,然后在不知不觉中将其更改为任何视图。

This because of size classes. 这是因为大小等级。 May be you uninstall some constraints in wAny and hAny. 可能是你在wAny和hAny中卸载了一些约束。 You need to re-install these constraints. 您需要重新安装这些约束。 After that you are able to see your view again. 之后,您可以再次看到您的视图。

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

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