2017-02-20 114 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会尝试! –