mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-02-26 04:43:03 +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];
|
[_statusBarBackgroundView removeFromSuperview];
|
||||||
}
|
}
|
||||||
|
|
||||||
CGRect frame = self.webView.frame;
|
if (!_statusBarOverlaysWebView) {
|
||||||
frame.origin.y = 0;
|
|
||||||
|
|
||||||
if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation)) {
|
CGRect frame = self.webView.frame;
|
||||||
frame.size.height += statusBarFrame.size.width;
|
frame.origin.y = 0;
|
||||||
} else {
|
|
||||||
frame.size.height += statusBarFrame.size.height;
|
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;
|
_statusBarBackgroundView.hidden = YES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user