javascript 在 PhoneGap 中手动删除启动画面

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11015993/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 11:50:00  来源:igfitidea点击:

Remove splash screen manually in PhoneGap

javascriptcordovasplash-screen

提问by fancy

On iOS I would like to hold the splash screen up until my app is ready. I see there is a flag in the Cordova.plist called AutoHideSplashScreen -- if I turn this off how to I trigger it's removal on my own?

在 iOS 上,我想保持启动画面直到我的应用程序准备好。我看到 Cordova.plist 中有一个名为 AutoHideSplashScreen 的标志——如果我关闭它,我如何触发它自己的删除?

Thanks!

谢谢!

回答by codemonkey

On iOS you should be able to call navigator.splashscreen.hide();

在 iOS 上,您应该可以调用 navigator.splashscreen.hide();

Support for doing this in Android is available since 1.8.0.

从 1.8.0 开始支持在 Android 中执行此操作。

回答by SERPRO

A quick look in Google and I found this

快速浏览谷歌,我发现了这个

Basically what you have to do is:

基本上你要做的是:

navigator.splashscreen.hide();

On Cordova 1.6.0 is:

在 Cordova 1.6.0 上是:

cordova.exec(null, null, "SplashScreen", "hide", [])