Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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?

— asked December 6th 2010 by Chris Kelly
  • backgroundimage
  • ipad
  • mobile

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'
    — answered December 6th 2010 by Antonio Silveira
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.