Gab*_* S. 6 ios nativescript nativescript-vue
我试着添加
<key>UIUserInterfaceStyle</key>
<string>Light</string>
Run Code Online (Sandbox Code Playgroud)
到 App_Resources/iOS/Info.plist
但是该应用程序仍然处于暗模式,即使在重建它并删除钩子、node_modules 和平台之后也是如此。
我正在使用tns preview --bundle.
小智 11
不确定您的代码会发生什么,但它确实应该起作用。我一直在使用它直到上次更新(当我们终于有时间处理暗模式时)。
您还应该能够强制使用灯光模式
import Theme from "@nativescript/theme";
Theme.setMode(Theme.Light);
Run Code Online (Sandbox Code Playgroud)
来源:https : //github.com/NativeScript/theme
放入AppDelegate
self.window?.backgroundColor = .white
if #available(iOS 13.0, *) {
self.window?.overrideUserInterfaceStyle = .light
}
Run Code Online (Sandbox Code Playgroud)