如何为 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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 18:31:09  来源:igfitidea点击:

How to enable Dark Mode for Xcode

xcodexcode10macos-high-sierra

提问by Lukas Würzburger

Apple announced a new Dark Mode for Xcode 10. I've downloaded the beta but now I can't find any option to turn it on. I'm currently on macOS 10.13 High Sierra.

Apple 宣布了适用于 Xcode 10 的新暗模式。我已经下载了测试版,但现在我找不到任何打开它的选项。我目前使用的是 macOS 10.13 High Sierra。

enter image description here

在此处输入图片说明

回答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 安装的一部分,您会被要求提供外观。

enter image description here

在此处输入图片说明

2. After Installation:If you want to change it afterwards go to System Preferences> Generaland change the Appearance.

2. 安装后:如果您想在之后更改它,请转到System Preferences>General并更改Appearance.

enter image description here

在此处输入图片说明

2b. On macOS Catalina:You get even a third option to change the appearance automatically based on your Nightshift preferences.

2b. 在 macOS Catalina 上:您甚至还有第三个选项可以根据您的 Nightshift 首选项自动更改外观。

enter image description here

在此处输入图片说明

回答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 的推文)