Xcode - 整个 UI 的深色主题

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

Xcode - Dark theme for the whole UI

xcodemacosuser-interfacethemes

提问by Max

How can one make Xcode's UI completely dark?

如何让 Xcode 的 UI 完全变暗?

There must be a way to have a dark theme for Xcode (like Visual Studio has it for example). I'm not only talking about a way of styling the editor, but a full-on dark theme. Dark menus, dark console, dark file browser, dark menu bar, etc.

必须有一种方法可以为 Xcode 设置深色主题(例如 Visual Studio 就有)。我不仅在谈论一种样式化编辑器的方式,而且是一个完整的黑暗主题。深色菜单、深色控制台、深色文件浏览器、深色菜单栏等。

Xcode's bright UI hurts at night and I can't be the only one who's really searching for this ;) (please don't recommand f.lux to me now, that's not a solution)

Xcode 明亮的用户界面在晚上很糟糕,我不可能是唯一一个真正在寻找这个的人 ;)(现在请不要向我推荐 f.lux,这不是解决方案)

回答by Bryan Norden

Xcode's UI can be changed to completely dark with Xcode 10 running on macOS Mojave. Just go into System Preferences -> General -> Under Appearance -> Click the dark mode

在 macOS Mojave 上运行的 Xcode 10 可以将 Xcode 的 UI 更改为完全黑暗。只需进入系统偏好设置 -> 常规 -> 在外观下 -> 点击黑暗模式

Enable Dark Appearance mode

启用深色外观模式

enter image description here

在此处输入图片说明

回答by alextooter

You can reference to this article:

你可以参考这篇文章:

https://medium.com/@guilhermerambo/how-to-enable-real-dark-mode-on-os-x-macos-14966f9f7d24

https://medium.com/@guilhermerambo/how-to-enable-real-dark-mode-on-os-x-macos-14966f9f7d24

Install a dark mode in system service,it make Xcode most control dark,it's not perfect, but works.

在系统服务中安装一个黑暗模式,它使Xcode大部分控制黑暗,它并不完美,但有效。

Hope Apple implement it someday.

希望苹果有一天能实现它。

回答by julia_v

In Preferences → Accessibilitythere is a checkbox Invert colors. Of course, it doesn't give a nice dark theme, but I found it quite useful when working in darkness. The whole system interface with this checkbox on looks funny.

Preferences → Accessibility有一个复选框Invert colors。当然,它并没有提供一个很好的黑暗主题,但我发现它在黑暗中工作时非常有用。带有此复选框的整个系统界面看起来很有趣。

回答by Rugmangathan

System wide dark mode is announced in macOS 10.14Mojave in WWDC 18. You can also enable dark mode for XCode 10. Dark mode in interface builder. Dark mode in XCode

WWDC 18 的macOS 10.14Mojave 中宣布了系统范围的暗模式。您还可以为XCode 10启用暗模式。界面构建器中的暗模式。 XCode 中的暗模式

Here is the link for XCode 10 beta

这是XCode 10 测试版的链接

回答by andresilvagomez

In Xcode 9 or below you can include the last the theme Dark,

在 Xcode 9 或更低版本中,您可以包含最后一个主题 Dark,

https://gist.github.com/andresilvagomez/94854ed5320fac2b3b5790e63efc516e

https://gist.github.com/andresilvagomez/94854ed5320fac2b3b5790e63efc516e

Execute this command

执行这个命令

open ~/Library/Developer/Xcode/UserData/FontAndColorThemes/

打开 ~/Library/Developer/Xcode/UserData/FontAndColorThemes/

and create this file there

并在那里创建这个文件

Default (Dark).xccolortheme

默认(深色).xccolortheme

and paste the content inside of URL

并将内容粘贴到 URL 中

回答by Jonathan Zhan

Don't think Xcode can do that. You might want to consider the excellent AppcodeIDE though.

不要认为 Xcode 可以做到这一点。不过,您可能需要考虑出色的AppcodeIDE。

回答by Dror Bar

This works in Xcode 9:

这适用于 Xcode 9:

Xcode --> Preferences.. --> Fonts & Colors tab --> Choose your them (Dusk / Midnight)

Xcode --> Preferences.. --> Fonts & Colors 选项卡 --> 选择它们(黄昏/午夜)