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

2

5

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

Gregor answered 20/9, 2013 at 23:10 Comment(0)
G
6

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)

Gregor answered 24/9, 2013 at 18:58 Comment(0)
S
2

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

Sensation answered 21/9, 2013 at 11:14 Comment(1)
OK, it works, now I don't have an empty space during launch, but I just realize that now, the status bar is always hidden (it's not what I want). Sorry, I remove the "answered mark", still looking for a solutionGregor

© 2022 - 2024 — McMap. All rights reserved.