所以,我正在使用"闪屏"对于我的Cordova iOS应用程序。我实际上正在使用" LaunchStoryBoard"图片。我的问题是它似乎在最终被解雇之前停留了很长时间。坚固3秒(如1密西西比等)。
我已经浏览过stackoverflow,但很多响应似乎都适用于Ionic框架/ Android。我没有使用它。直接使用iOS的Cordova。
这是我的config.xml:
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="DisallowOverscroll" value="true" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<splash src="res/screen/ios/Default@2x~universal~anyany.png" />
</platform>
在我的应用&#34;常规设置&#34;我有&#34;启动屏幕文件&#34;设置为CDVLaunchScreen。
同样,它工作正常,只是停留太久。剃掉它甚至1秒钟也会很棒。
此外,如果您有任何自定义的JavaScript提示/帮助,请告诉我应该放入哪个文件(例如,index.js)。
提前致谢。
答案 0 :(得分:0)
两种方法。
SplashScreenDelay
首选项来设置您选择的延迟。AutoHideSplashScreen
首选项设置为false
,然后您可以在索引页面的onload中使用此代码来隐藏启动画面:
navigator.splashscreen.hide();