Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 577
Samuel Avatar asked Sep 20 '13 23:09

Samuel


2 Answers

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)

like image 128
Samuel Avatar answered Oct 23 '22 01:10

Samuel


In addition to

<key>UIStatusBarHidden</key>
<true/>
<key>UIStatusBarHidden~ipad</key>

You need to also add another key in your .plist so your cordova app is not impacted by the new status bar mode

<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>

Cheers D

like image 40
Delta Avatar answered Oct 23 '22 00:10

Delta