如何在故事板上抑制 Xcode 5 中的约束和布局警告?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22351636/
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
How-to suppress constraint and layout warnings in Xcode 5 on a storyboard?
提问by Hyman
is there any flag to suppress Ambiguous Layout or Misplaced views for storyboards in Xcode 5.
是否有任何标志可以抑制 Xcode 5 中故事板的模糊布局或错位视图。
I am adding the constraints in code and am just using the views in Interfacebuilder as dummies.
我在代码中添加了约束,只是将 Interfacebuilder 中的视图用作傻瓜。
I do not want to apply Xcode Resolve auto layout issues since I am happy how the views appear visually in Interfacebuilder?
我不想应用 Xcode Resolve 自动布局问题,因为我很高兴视图在 Interfacebuilder 中的视觉效果如何?
采纳答案by NSTJ
Select Project Build Settings -> Interface Builder XIB Compiler - Options -> Show Warnings -> set to "NO"
选择 Project Build Settings -> Interface Builder XIB Compiler - Options -> Show Warnings -> 设置为“NO”
Note that if you wish to clear existing warnings you can clean your project using Shift+?+k
请注意,如果您希望清除现有警告,您可以使用 Shift+?+k
回答by Hyman
I needed to completely restart Xcode for the
我需要完全重新启动 Xcode
Interface Builder XIB Compiler - Options
WARNINGS Flag = NO
to be considered!
要考虑!