Window backgroundImage doesn't appear to work on iPad
Hey guys, I'm developing an app that basically just loads an HTML5 app we built on the web into a WebView.
I've set it up to create the webview and load from the proper URL and upon full load, it'll show the webview. In the meantime I have an image set as the backgroundImage of the window that should act like a splash screen until the app loads.
This works fine on the iPad simulator, yet when I run the app on the device itself it's just a black screen until the webview fully loads and shows itself.
Does anyone know a method that would work for this case?
1 Answer
-
Hi Chris,
I think you are stuck with the WebView backgroundColor, which by default is 'white', it should be set to 'transparent'. Here is a sample code that works:var win = Ti.UI.createWindow({ title: 'Main Window', backgroundImage: 'images/bg.png' }); var webview = Ti.UI.createWebView({ url: 'http://mydomain.com/app.html', backgroundColor: 'transparent' }); win.add(webview);