Skip to content

Commit

Permalink
Issue #21 fix
Browse files Browse the repository at this point in the history
+ don't resize the webview when hiding the statusbar if its overlaid
  • Loading branch information
Ryan Willoughby committed Feb 26, 2014
1 parent 9c771f1 commit 0944be5
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/ios/CDVStatusBar.m
Expand Up @@ -319,16 +319,20 @@ - (void) hide:(CDVInvokedUrlCommand*)command
[_statusBarBackgroundView removeFromSuperview];
}

CGRect frame = self.webView.frame;
frame.origin.y = 0;
if (!_statusBarOverlaysWebView) {

if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation)) {
frame.size.height += statusBarFrame.size.width;
} else {
frame.size.height += statusBarFrame.size.height;
CGRect frame = self.webView.frame;
frame.origin.y = 0;

if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation)) {
frame.size.height += statusBarFrame.size.width;
} else {
frame.size.height += statusBarFrame.size.height;
}

self.webView.frame = frame;
}

self.webView.frame = frame;
_statusBarBackgroundView.hidden = YES;
}
}
Expand Down

0 comments on commit 0944be5

Please sign in to comment.