科尔多瓦iOS初始屏幕保持waaay太长
问题描述:
因此,我为我的科尔多瓦iOS应用程序使用“初始屏幕”。我实际上使用了“LaunchStoryBoard”图片。我的问题是,它似乎停留很长时间才终于被解雇。坚实的3秒(如1密西西比河等)。科尔多瓦iOS初始屏幕保持waaay太长
我已经看了一下在*,但很多反应似乎是离子框架/ Android。我没有使用它。只是直接与iOS的科尔多瓦。
这里是我的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/[email protected]~universal~anyany.png" />
</platform>
而且在我的应用程序的“常规设置”无我有“启动画面文件”设置为CDVLaunchScreen。
再次,它工作正常,只是停留太久。剃光1秒钟就太棒了。另外,如果您有任何自定义的JavaScript提示/帮助,请让我知道它应该放入哪个文件(例如,index.js)。
在此先感谢。
答
有两种方法可以解决它。
- 您可以尝试使用科尔多瓦splash screen plugin和利用
SplashScreenDelay
偏好设置您所选择的延迟。 - 可以使用闪屏插件,设置
AutoHideSplashScreen
偏好false
,然后你可以使用此代码在您的索引页的onload隐藏启动画面:navigator.splashscreen.hide();
那是整个config.xml吗?任何其他插件? –