Remove splash screen manually in PhoneGap

2019-06-17 04:35发布

问题:

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?

Thanks!

回答1:

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

Support for doing this in Android is available since 1.8.0.



回答2:

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.exec(null, null, "SplashScreen", "hide", [])