IOS PhoneGap app updated to Cordoba 2.1 - content completely ignores the status bar

I just finished updating my iOS PhoneGap app to Cordoba 2.1. The application works great, but when run on a simulator, the contents of the application seem to completely ignore the fact that the status bar is there. 20px of content is hidden under the status bar, and I can’t add an add-on to even move it.

How to fix it?

+5
source share
2 answers

If you updated the application to use PhoneGap 2.1 from another version, the MainViewController.m file may not be up to date.

It should have the following code:

#pragma mark - View lifecycle

- (void)viewWillAppear:(BOOL)animated
{
    // Set the main view to utilize the entire application frame space of the device.
    // Change this to suit your view UI footprint needs in your application.
    self.view.frame = [[UIScreen mainScreen] applicationFrame];

    [super viewWillAppear:animated];
}

As soon as you have this feature, your application will return to normal operation.

( )

+9

, , .

, :

[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]

, .

info.plist ,

<key>UIStatusBarHidden</key>
0

All Articles