UIUserInterfaceStyle键在Xcode 12的Info.plist中不可用,如何从Info.plist禁用Xcode 12的暗模式?

问题描述

我试图通过在Info.plist文件中将UIUserInterfaceStyle键设置为Light来禁用暗模式支持,但现在在Xcode 12的Info.plist中不可用。

enter image description here

是否仍然可以从Xcode 12中的iOS Apps的Info.plist文件禁用暗模式支持

解决方法

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

,

现在您可以使用 info.plist 文件中的外观键来避免暗模式enter image description here