在phonegap中删除ios和android的启动画面

时间:2013-01-03 09:04:59

标签: android ios cordova phonegap-plugins

我试图在ios和android的phonegap应用程序中完全删除启动画面。 navigator.hide()函数仅在加载html页面后才起作用,但我需要在此之前删除启动画面。请告诉我有没有可用的选项。

3 个答案:

答案 0 :(得分:5)

Cordova 1.6.0 - 已删除navigator.splashscreen界面,等待跨平台支持。现在您可以使用:

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

我在这里找到了它:iOS PhoneGap / Cordova – Splash screen control

如果您想要其他参考,请在链接中查看PhoneGap Android SplashScreen Just Got Better

您也可以浏览Google Discussion

希望它对你有所帮助。

答案 1 :(得分:2)

查看this post

复制接受的答案以便快速参考:

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

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

答案 2 :(得分:0)

希望它会帮助某人:

使用PhoneGap 2.6.0,我所做的只是评论:

<plugin name="SplashScreen" value="CDVSplashScreen" />

在PhoneGap的config.xml文件中排队(通常位于iOS项目根目录)