I am fairly new to XCode – I’m designing an app with a single view that just displays a UIWebView that loads my jQuery mobile web site.
I have the Default.png and Default@2x.png files for the Launch images in place. When I run the app on my test device or in the emulator, it shows my Launch Image, and then flashes a white screen while the UIWebView loads the first page.
I know that I can change the background color and opacity so it will flash a different color than white, but I would like to prevent the flash altogether. I would like the app to launch, show the Launch image, and not show the UIWebView until the first page has completely loaded. Help?
@ Andreas Volz (and anyone else wondering how I solved the problem of the white “flash”)
First, add the
name-of-loading-image.pngandname-of-loading-image@2x.pngfiles to your Xcode project. The regular image should be 320 x 460, and the@2ximage should be 640 x 920.Then, in my
ViewController.hfile I added these properties:And then in my
ViewController.mfile I added this: