Search code examples
cordovaios7splash-screeniphone-5

iOS7 Startup screen (splash screen) leave a space on the bottom


I have a problem occurring when starting up my iOS7 Phonegap app with iPhone 4 inch, the startup screen goes up and leave an empty space on the bottom (and we can see the view behind) :

http://screencloud.net/v/5gAO (I have hidden most of the splashcreen, but you can see the space on the bottom)

I only hide the screenshot once my app is loaded (AutoHideScreenshot = FALSE), maybe I am doing something wrong when the app is sarting ?

Everything looks correctly configured in XCode: screenshot XCode

Any idea? Thanks in advance


Solution

  • Just found the solution here: https://issues.apache.org/jira/browse/CB-4391 If you can't update cordova, you can apply the fix. Open CDVSplashScreen.m and replace the line:

    imgBounds.origin.y -= statusFrame.size.height;
    

    by this line:

        if (!(IsAtLeastiOSVersion(@"7.0"))) {
            imgBounds.origin.y -= statusFrame.size.height;
        }
    

    It's because in iOS7, the status bar is integrated in the view (it doesn't take place)