我正在使用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