Cordoba iOS app getting a white flash between the deployment rocket and the first screen

I just converted an iOS Cordova application that used the SplashScreen plugin to use the launch storyboard to support iOS 9 multitasking on the iPad. This works, but now I have a white flash between the launch screen and the first screen of the application. Previously, when I used the splashscreen plugin, I turned off AutomaticHideSplashScreen and used the plugin plugin API to hide it when I was sure that the first screen rendering would be complete.

Is there a way to do something like this, or at least delay the disappearance of the startup screen in order to display web browsing time?

+4
source share
1 answer

Adding the launch xib view of the startup screen as a subspecies of the rootViewController view should fix this. Just add the following code to the application didFinishLaunchingWithOptions method in AppDelegate.m just above the line that says it 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];
0
source

Source: https://habr.com/ru/post/1620841/


All Articles