CB-6187 - If you Show and Hide the StatusBar - it will expand the screen-size by ~20 pixels + don't resize the webview on hide if statusbar overlays it

This commit is contained in:
Ryan Willoughby 2014-02-25 17:54:37 -08:00 committed by Shazron Abdullah
parent 69c1aee5ce
commit a4d6320c37

View File

@ -319,16 +319,20 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
[_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;
}
}