I’m trying to build a native application that for all intents and purposes is HTML/CSS and Javascript. It all works fine, but when the UIWebView loads there’s a delay while the DOM is populated, images retrieved etc.
Is there anyway to display a background image on the UIWebView, or something behind it? Ideally this will be the same as the splash screen so it doesn’t affect the experience of transitioning from slash to app.
Thanks
Robbie
I don’t believe you want to be setting the UIWebView as transparent and showing an image behind it.
Instead you should have some sort of view (maybe with a picture as you suggest, maybe with a UIIndicator and a semi-transparent view that “darkens” the page) that sits there until the UIWebView has loaded its content.
To do this, first your class should subscribe to the UIWebViewDelegate protocol:
Then, you can show a view on load:
And finally, you can override the webViewDidFinishLoad method to hide it once it’s loaded