2014-11-02 47 views
0

我想確保我的閃屏不iOS phonegap v3隱藏閃屏的PhoneGap V3

顯示我曾嘗試以下的建議在their documentation

,其中包括安裝splash plugin

我立即致電隱藏

navigator.splashscreen.hide() 

項目佈局

¬ res 
    ¬ icon 

config.xml中

<gap:plugin name="org.apache.cordova.splashscreen" /> 
<feature name="SplashScreen"> 
    <param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen" /> 
    <param name="ios-package" value="CDVSplashScreen" /> 
</feature> 

公告不存在飛濺的文件夾。然而,啓動畫面將始終顯示並顯示默認的phonegap啓動畫面,而不是跳過它。

值得一提的,我通過https://build.phonegap.com

回答

0

建設,我認爲 - 脅迫覺得 - 你不能做到這一點。您可以通過使用與您的應用顏色相匹配的單一顏色的閃屏來僞造它。

1

您確定在致電navigator.splashscreen.hide()之前deviceready事件正在發射嗎?在事件被解僱後立即調用.hide()應該會產生您正在尋找的結果。

此外,您還可以嘗試更換完全的閃屏插件科爾多瓦的新選擇:

cordova.exec(null, null, 「SplashScreen」, 「hide」, [])

cordova.exec命令掛鉤直入不同的設備本地環境。

參數詳細解釋:

function(winParam) {} - Success function callback. Assuming your exec call completes successfully, this function will be invoked (optionally with any parameters you pass back to it) 
function(error) {} - Error function callback. If the operation does not complete successfully, this function will be invoked (optionally with an error parameter) 
"service" - The service name to call into on the native side. This will be mapped to a native class. 
"action" - The action name to call into. This is picked up by the native class receiving the exec call, and, depending on the platform, essentially maps to a class's method. 
[/* arguments */] - Arguments to get passed into the native environment 
+0

有趣...... exec函數都是直接掛接到手機本地功能。這看起來不錯! – 2014-11-02 10:12:34