Xcode 12中Info.plist中不存在UIUserInterfaceStyle键,如何通过Info.plist禁用Dark Mode?

4
我正在尝试通过在 Info.plist 文件中将 UIUserInterfaceStyle 键设置为 Light 来禁用 Dark Mode 支持,但是在 Xcode 12 中 Info.plist 中不再可用。

enter image description here

在Xcode 12中,是否仍然可以通过Info.plist文件禁用iOS应用程序的Dark Mode支持?
2个回答

10

它仍然存在。使用 Appearance 键。 如果你想找到 UIUserInterfaceStyle,只需右键单击打开菜单,然后勾选 Raw Keys & Values,然后就可以添加 UIUserInterfaceStyle


3
现在,您可以在 info.plist 文件中使用 Appearance 键来避免深色模式。 enter image description here

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接