我正在使用PhoneGap
创建iOS9+
应用程序。根据指南,我已经在Config.xml
中添加了以下代码以设置启动画面。
// set the cordova plugin
<plugin name="cordova-plugin-splashscreen" source="npm" spec=">1.0.0" />
// set splash screen for iPad only
<platform name="ios">
<gap:splash gap:platform="ios" height="2048" src="res/screen/ios/Default-Portrait@2x~ipad.png" width="1536" />
<gap:splash gap:platform="ios" height="2048" src="res/screen/ios/Default-Portrait@2x~ipad.png" width="1536" />
<gap:splash gap:platform="ios" height="768" src="res/screen/ios/Default-Landscape~ipad.png" width="1024" />
<gap:splash gap:platform="ios" height="1536" src="res/screen/ios/Default-Landscape@2x~ipad.png" width="2048" />
</platform>
然后我在“终端”中使用以下命令生成iOS平台
phonegap build ios --device
它复制了所有在iOS平台上的启动图片。但是当我启动应用程序时,它显示默认的Phonegap启动屏幕图像。我在iOS项目“Images.xcassets”->“LaunchImage”中检查了一下,它显示了默认的PhoneGap图像。它没有显示我在Config.xml文件中提到的启动图片。我该如何使用config.xml为iOS设置启动图片?
$cordovaSplashscreen
显示或隐藏启动画面。 - Mable John