2017-02-20 106 views
1

我怎樣才能獲得splashscreentime倒在我的項目?我試圖裁剪圖像,但這似乎沒有多大幫助。現在需要11秒.. 我將標準值更改爲3000毫秒,沒有幫助.. 這是一個ionic2 angular2應用程序。閃屏時間太長

回答

3

在你的config.xml中添加

<preference name="AutoHideSplashScreen" value="false"/> 

然後在你的app.component.ts添加以下

initializeApp() { 
    this.platform.ready().then(() => { 
     // Okay, so the platform is ready and our plugins are available. 
     // Here you can do any higher level native things you might need. 
     StatusBar.styleDefault(); 
     Splashscreen.hide(); 
    } 
} 

這樣,當你的應用程序已經準備好你的閃屏僅消失。這應該比10秒快得多

+1

thx會嘗試! –