简体   繁体   English

xcode Interface Builder背景颜色首选项

[英]xcode Interface Builder background color preference

It seems odd, so i am likely just missing it in preferences, but how does one change the actual background color of IB in Xcode? 这看起来很奇怪,所以我可能只是在偏好中错过了它,但是如何改变Xcode中IB的实际背景颜色? Not any of the elements, but the actual blinding white of the standard IB? 不是任何元素,而是标准IB的实际炫目白色? Too much contrast and when you zoom out, the view controllers almost disappear.. 对比度太大,当你缩小时,视图控制器几乎消失了..

Thanks for any tips.. 谢谢你的任何提示..

I've gone ahead and created an Xcode plugin that changes the background color of the storyboard editor. 我已经开始创建一个Xcode插件来改变故事板编辑器的背景颜色。 You can find the source at rpendleton/xcode-canvas-color . 您可以在rpendleton / xcode-canvas-color找到源代码。 I've hardcoded it to a light gray color, as shown in the screenshot below, but this can be changed easily. 我已将其硬编码为浅灰色,如下面的屏幕截图所示,但这可以轻松更改。

(Also, I don't think you're missing a setting for it. When I decompiled Xcode, the drawRect method for the background view explicitly called [[NSColor whiteColor] set] .) (另外,我不认为你错过了它的设置。当我反编译Xcode时,后台视图的drawRect方法显式调用[[NSColor whiteColor] set] 。)

截图

One doesn't. 一个没有。 Submitting a feature request to Apple is your only hope. 向Apple提交功能请求是您唯一的希望。

Unfortunately, with recent changes to Xcode, Ryan Pendleton's plugin is no longer a viable option. 不幸的是,随着Xcode最近的变化,Ryan Pendleton的插件不再是一个可行的选择。 (unless you are willing to break Xcode's code signing, which can be quite problematic.) However, the good news is that there is now an official solution -- so long as you are willing to upgrade to OS X 10.14 Mojave: Upgrade to OS X 10.14 Mojave and turn on Dark mode. (除非你愿意打破Xcode的代码签名,这可能很成问题。)然而,好消息是现在有一个官方的解决方案 - 只要你愿意升级到OS X 10.14 Mojave: 升级到操作系统X 10.14 Mojave并打开暗模式。 When Dark Mode is enabled, the background in Interface Builder darkens to a nice, eye-pleasing dark gray color. 启用暗模式后,Interface Builder中的背景会变暗,呈现令人赏心悦目的深灰色。 Navigating around a large storyboard is now MUCH easier (and less eye-scorching :) ) 导航大型故事板现在变得更容易(并且不那么引人注目:))

Before: 之前:

在此输入图像描述

After: 后:

在此输入图像描述

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

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