在PhoneGap / Cordova应用程序中使用AutoHideSplashScreen选项 [英] Using AutoHideSplashScreen option with PhoneGap / Cordova application

查看:902
本文介绍了在PhoneGap / Cordova应用程序中使用AutoHideSplashScreen选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试过外挂程式,但我无法似乎想出了如何使其与Cordova工作。没有定义插件 navigator.splashscreen 。我缺少什么?

I have tried the plugin but I can't seem to figure out how to make it work with Cordova. Without the plugin navigator.splashscreen isn't defined. What am I missing?

推荐答案

不需要插件。

在Cordova中将键 AutoHideSplashScreen 设为 NO plist,然后在设备就绪后,使用 navigator.splashscreen.hide(); 隐藏闪屏。

Set the key AutoHideSplashScreen to NO in Cordova.plist, then after device ready fires, use navigator.splashscreen.hide(); to hide the splash screen.

在尝试访问 navigator.splashscreen

编辑

正如@respectTheCode所述,从1.6开始, cordova.exec(null,null,SplashScreen,hide,[])

As mentioned by @respectTheCode below, as of 1.6 this has been removed and codified across platforms as cordova.exec(null, null, "SplashScreen", "hide", [])

这篇关于在PhoneGap / Cordova应用程序中使用AutoHideSplashScreen选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆