如何为 Xcode 启用暗模式
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/50696931/
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 enable Dark Mode for Xcode
提问by Lukas Würzburger
回答by Lukas Würzburger
On macOS 10.13 High Sierra and earlier
在 macOS 10.13 High Sierra 及更早版本上
The Dark Mode is only available on macOS 10.14 Mojave.
暗模式仅在 macOS 10.14 Mojave 上可用。
On macOS 10.14 Mojave and later
在 macOS 10.14 Mojave 及更高版本上
1. On Installation:You'll get asked for the appearance as part of the installation of Mojave.
1. 安装时:作为 Mojave 安装的一部分,您会被要求提供外观。
2. After Installation:If you want to change it afterwards go to System Preferences
> General
and change the Appearance
.
2. 安装后:如果您想在之后更改它,请转到System Preferences
>General
并更改Appearance
.
2b. On macOS Catalina:You get even a third option to change the appearance automatically based on your Nightshift preferences.
2b. 在 macOS Catalina 上:您甚至还有第三个选项可以根据您的 Nightshift 首选项自动更改外观。
回答by Maximelc
If you use macOS Mojave (10.14.+), you can enable Dark Mode only for Xcode 10 using this command line.
如果您使用 macOS Mojave (10.14.+),则只能使用此命令行为 Xcode 10 启用暗模式。
defaults write com.apple.dt.Xcode NSWindowDarkChocolate -bool true
Workaround:
解决方法:
defaults write com.apple.dt.Xcode _NSSystemAppearanceOverride DarkAppearance
Source(Steve Troughton-Smith's tweet)
来源(Steve Troughton-Smith 的推文)