我正在使用PhoneGap
创建iOS
应用程序iOS9+
。根据指南,我在Config.xml
中添加了以下代码来设置启动画面。如何在PhoneGap中为iOS设置启动画面
// 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/[email protected]~ipad.png" width="1536" />
<gap:splash gap:platform="ios" height="2048" src="res/screen/ios/[email protected]~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/[email protected]~ipad.png" width="2048" />
</platform>
然后我用在“终端”下面的命令来生成iOS平台
phonegap build ios --device
它会将所有飞溅图像iOS
平台。
但是,当我启动应用程序时,它显示默认Phonegap
启动屏幕图像。我检查了iOS项目'Images.xcassets' - >'LaunchImage
,它显示默认PhoneGap
图像。它没有显示我在Config.xml文件中提到的splash图像。如何使用3210设置iOS
?
显示或使用ngCordova插件'$ cordovaSplashscreen' – young
选中此http://ngcordova.com/docs/plugins/splashscreen/ – young
检查这也HTTPS隐藏闪屏:// cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/ – young