是否可以在 High Sierra 上的 Xcode 10 上启用暗模式?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/50694262/
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
Is it possible to enable Dark Mode on Xcode 10 on High Sierra?
提问by passingnil
I downloaded xcode 10 beta and installed it on my macbook which is running on macOs 10.13.4 High Sierra. I tried to enable dark mode on xcode 10, but i could find how to do it ? Any suggestions, is it possible ?
我下载了 xcode 10 beta 并将其安装在我的 macbook 上,该 macbook 在 macOs 10.13.4 High Sierra 上运行。我试图在 xcode 10 上启用暗模式,但我能找到方法吗?任何建议,可能吗?
upd: as i understand, xcode gets the system appearance value and renders in that mode, so it must be possible with some command in terminal
upd:据我所知,xcode 获取系统外观值并以该模式呈现,因此必须可以在终端中使用某些命令
回答by Anbu.Karthik
is not related to your XCode its related to macOS, the feature available from 10.14 Mojave onwards, for detail info you get from here
与您的 XCode 无关,它与macOS相关,该功能从10.14 Mojave 开始可用 ,有关详细信息,您可以从此处获得
Mojave Release date
莫哈韦沙漠上映日期
Apple said that the developer beta for all software would be made available on 4 June, while the public iOS 12 beta will be available later in June.
苹果表示,所有软件的开发者测试版将于 6 月 4 日发布,而公开的 iOS 12 测试版将于 6 月下旬发布。
Mojave: New features
莫哈韦沙漠:新功能
In particular, Apple appears to have focused on enhancing the Finder and Quick Look. But other new features are welcome, in particular Dark Mode, which we will look at first
尤其是,Apple 似乎专注于增强 Finder 和 Quick Look。但欢迎其他新功能,特别是黑暗模式,我们将首先看看
Dark mode
黑暗模式
A Dark Mode is nothing new - there has been a Dark Mode available since El Capitan, but it only changed the appearance of menu bar and Dock. However, the new Dark Mode is what everyone had been calling for.
暗模式并不是什么新鲜事——自从 El Capitan 以来就有暗模式可用,但它只是改变了菜单栏和 Dock 的外观。然而,新的黑暗模式是每个人都一直在呼吁的。
In High Sierra, Dark Mode adjusts the colour of the menu bar and dock, but little else. The Dock's translucent background becomes darker, the menu bar's drop-down menus are darker (although still translucent).
在High Sierra 中,暗模式会调整菜单栏和停靠栏的颜色,但其他的很少。Dock 的半透明背景变得更暗,菜单栏的下拉菜单更暗(尽管仍然是半透明的)。
Not all third-party apps offer support for the dark menu bar, and even some Apple apps, such as Safari, currently feature a bright translucent sidebar.
并非所有第三方应用程序都支持深色菜单栏,甚至一些 Apple 应用程序(例如 Safari)目前也具有明亮的半透明侧边栏。
The Dark Mode in Mojave, will be applied to all elements of the interface, in every app, system-wide. Users can choose whether to turn it on
Mojave 中的黑暗模式将应用于系统范围内每个应用程序中的所有界面元素。用户可以选择是否开启
for enable and disable the Dark Modefor reference purpose I taken the answer from here
为了启用和禁用暗模式以供参考,我从这里得到了答案
Short answer
简答
click on ? > System Preferences from the menu and choose General. Here choose the second option under ‘Appearance' to toggle into dark mode, step by step tutorial you get here
点击 ?> 从菜单中选择系统偏好设置并选择常规。这里选择“外观”下的第二个选项切换到暗模式,一步一步的教程你在这里
Step 1.
第1步。
Click on Apple Menu on your Mac
单击 Mac 上的 Apple 菜单
Step 2.
第2步。
click on System Preference.
单击系统偏好设置。
Step 3.
第 3 步。
click on General.
点击通用。
step 4.
第四步。
Next up, check out the second option next to Appearance. Simply select it to activate Dark Mode on your macOS.
接下来,查看外观旁边的第二个选项。只需选择它即可在 macOS 上激活暗模式。
Disable the dark mode
禁用黑暗模式
follow the above 3steps and finally deselect the second option that's right next to Appearance.
按照上面的3个步骤,最后取消选择外观旁边的第二个选项。
回答by janaz
You need to follow those steps:
您需要按照以下步骤操作:
- Go to: https://developer.apple.com/download/
- Install macOS Mojave 10.14 beta version.
- Install Xcode 10 beta.
- Go to System Preferences/General and change appearance to dark mode.
- Then, you can work 24/7
- 前往:https: //developer.apple.com/download/
- 安装 macOS Mojave 10.14 测试版。
- 安装 Xcode 10 测试版。
- 转到系统偏好设置/常规并将外观更改为暗模式。
- 然后,您可以 24/7 全天候工作
回答by Maximelc
Not possible to fully in High Sierra but if you use macOS Mojave (10.14.+), you can enable dark mode only for Xcode 10 using this command line.
在 High Sierra 中无法完全使用,但如果您使用 macOS Mojave (10.14.+),则可以使用此命令行仅为 Xcode 10 启用暗模式。
defaults write com.apple.dt.Xcode NSWindowDarkChocolate -bool true
Using this command line on lower version of macOS will partially break your Xcode interface.
在较低版本的 macOS 上使用此命令行会部分破坏您的 Xcode 界面。
(tested with High Sierra V10.13.4)
(使用 High Sierra V10.13.4 测试)
回答by Dave Y
For those of you like me looking in 2020 who couldn't find how to enable dark mode even on dark-mode-supporting systems, it's super simple. Just go to preferences -> general. There you can set Xcode's appearance to always dark, always light, or system-dependant.
对于像我这样展望 2020 年的人来说,即使在支持暗模式的系统上也找不到如何启用暗模式的方法,这非常简单。只需转到首选项 -> 一般。在那里您可以将 Xcode 的外观设置为始终为深色、始终为浅色或取决于系统。
回答by Sin
It'll become very ugly if you force to enable dark mode on High Sierra, and I have changed the color scheme before...
如果您在 High Sierra 上强制启用暗模式,它会变得非常难看,而且我之前更改了配色方案...
global
全球的
defaults write -g NSWindowDarkChocolate -bool TRUE
默认写 -g NSWindowDarkChocolate -bool TRUE
Xcode only
仅限 Xcode
defaults write com.apple.dt.Xcode NSWindowDarkChocolate -bool true
默认写 com.apple.dt.Xcode NSWindowDarkChocolate -bool true
回答by dabo248
Only for macOS Mojave 10.14and onwards..
仅适用于macOS Mojave 10.14及更高版本。
If you want to use Xcode in dark mode while maintaining a different system wide mode or generally modify the mode per app I can recommend Gray(https://github.com/zenangst/Gray). Grayis a simple tool providing an interface for application-specific user configurations.
如果您想在暗模式下使用 Xcode,同时保持不同的系统范围模式或通常修改每个应用程序的模式,我可以推荐Gray( https://github.com/zenangst/Gray)。Gray是一个简单的工具,为特定于应用程序的用户配置提供界面。
回答by Jonas
jw382 is a little confused about the Dark Mode, yes you can have a dark Mode, like Midnight, but not the new Xcode 10 beta Dark Mode, where everything is in a dark area. Maybe this other like will help : How do you change Xcode 10 Beta to the new "Darkmode"?
jw382 对黑暗模式有点困惑,是的,你可以有一个黑暗模式,比如午夜,但不是新的 Xcode 10 beta 黑暗模式,所有东西都在黑暗区域。也许其他喜欢会有所帮助:您如何将 Xcode 10 Beta 更改为新的“Darkmode”?
You need to install MoJave 10.14 beta to make you mac Dark Mode first.
您需要先安装 MoJave 10.14 beta 才能使您的 mac 暗模式。