gpt4 book ai didi

objective-c - 如何在 Mojave 中为我的应用禁用暗模式?

转载 作者:太空狗 更新时间:2023-10-30 03:25:56 25 4
gpt4 key购买 nike

当我在 Mojave 下的 Xcode 10 中构建我的 macOS 应用程序时,它会自动使我的应用程序采用深色模式。我还没有准备好为我的应用实现深色模式。

如何为我的应用禁用深色模式,使其在 macOS 下的浅色和深色模式下都显示为浅绿色?

最佳答案

来自 Supporting Dark Mode in Your Interface: Choosing a Specific Appearance for Your App – Opt Out of Dark Mode :

Apps linked against macOS 10.14 or later should support both light and dark appearances. […]

If you need extra time to work on your app's Dark Mode support, you can temporarily opt out by including the NSRequiresAquaSystemAppearance key (with a value of YES) in your app’s Info.plist file. Setting this key to YES causes the system to ignore the user's preference and always apply a light appearance to your app.

关于objective-c - 如何在 Mojave 中为我的应用禁用暗模式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52507949/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com