Xcode Storyboard 在 UI 元素周围显示蓝框。我如何关闭它?

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

Xcode Storyboard Shows Blue Frames Around UI Elements. How do I turn this off?

iosxcodestoryboardinterface-builder

提问by Mario A Guzman

I'm honestly not sure what I did here. I've never seen this before. Xcode is now showing blue frames around every UI Element in my Storyboard. This goes for ALL View Controllers inside it. How can I undo this or fix this?

老实说,我不确定我在这里做了什么。我以前从未见过这个。Xcode 现在在我的 Storyboard 中的每个 UI 元素周围显示蓝框。这适用于其中的所有视图控制器。我该如何撤消或解决这个问题?

Please See Screenshot Below:

请看下面的截图:

enter image description here

在此处输入图片说明

回答by Paulw11

They are the bounds rectangles for your UI elements - they help you see the size of the various elements where it may not be immediately obvious due to background colours etc.

它们是 UI 元素的边界矩形 - 它们帮助您查看各种元素的大小,其中由于背景颜色等原因,这些元素可能不会立即明显。

You can turn them off by going to the Editor menu->Canvas->Show Bounds Rectangles

您可以通过转到编辑器菜单->画布->显示边界矩形来关闭它们

enter image description here

在此处输入图片说明

回答by Matthew Harries

In Xcode 9, turn off Editor->Canvas->Show Bounds Rectangles. The rectangles still don't disappear. Turn it back on, and then turn it off again, and the problem should be resolved.

在 Xcode 9 中,关闭 Editor->Canvas->Show Bounds Rectangles。矩形仍然没有消失。重新打开,然后再次关闭,问题应该解决了。