mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-01-31 10:35:41 +08:00
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:
parent
69c1aee5ce
commit
a4d6320c37
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user