iOS、Swift 应用程序始终在深色模式下运行

发布于 2025-01-10 23:58:57 字数 63 浏览 1 评论 0 原文

所以我只希望我的应用程序始终在黑暗模式下运行。即使设备以浅色显示,我仍然希望应用程序在深色模式下运行。这可能吗?

So I just want my app to always run in dark mode. Even if the device appearance in in Light I still want the app to run in dark mode. Is this possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一身软味 2025-01-17 23:58:57

是的,有可能,您必须在 Info.plist 中将“Appearance”键添加到“Dark”,例如:

在此处输入图像描述

Yes, It's possible, You must Add "Appearance" key to "Dark" in Info.plist such as:

enter image description here

喜爱纠缠 2025-01-17 23:58:57

您可以在 Info.plist 中将 UIUserInterfaceStyle 设置为 Dark,如 是否可以在 iOS 13 上选择退出深色模式?

You can set UIUserInterfaceStyle to Dark in your Info.plist as explained in Is it possible to opt-out of dark mode on iOS 13?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文