Cordova iOS app Gets white Flash between Launch Storyboard and First Screen

I just converted an iOS Cordova app that uses the SplashScreen plugin to use Launch Storyboard, so it will support iOS 9 multitasking on the iPad. This works, but now I have a white flash between the release storyboard and the first screen of the app. Previously, when I used the splashscreen plugin, I turned off AutomaticHideSplashScreen and used the splashscreen plugin API to hide it, when I was sure of the first screen The rendering will be completed.

Is there a way to do something similar, or at least delay the disappearance of the splash screen, so as to give the webview time to render?

Adding the splash screen xib view as a subview of the rootViewController view should solve this problem. Just in Add the following code to the didFinishLaunchingWithOptions method of the application in AppDelegate.m, just above the line that returns YES.

UIViewController * launchScreenView = [[[NSBundle mainBundle] loadNibNamed :@"LaunchScreen" owner:self options:nil] objectAtIndex:0];
launchScreenView.view.frame = [[UIScreen mainScreen] bounds];
[self.window.rootViewController.view addSubview:launchScreenView .view];

I just converted an iOS Cordova app that uses the SplashScreen plugin to use Launch Storyboard, so it will support iOS 9 on iPad more Task handling. This works, but now I have a white flash between the release storyboard and the first screen of the app. Previously, when I used the splashscreen plugin, I turned off AutomaticHideSplashScreen and used the splashscreen plugin API to hide it , When I am sure that the rendering of the first screen will be completed.

Is there a way to do something similar, or at least delay the disappearance of the splash screen to give the webview time to render?

Adding the startup screen xib view as a subview of the rootViewController view should solve this problem. Just add the following in the didFinishLaunchingWithOptions method of the application in AppDelegate.m The code is just above the line that returns YES.

UIViewController * launchScreenView = [[[NSBundle mainBundle] loadNibNamed:@"LaunchScreen" owner:self options:nil] objectAtIndex:0];
launchScreenView.view.frame = [[UIScreen mainScreen] bounds];
[self.window.rootViewController.view addSubview:launchScreenView.view];

Leave a Comment

Your email address will not be published.