mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2026-04-27 00:00:06 +08:00
ios: Fix hide to adjust webview's frame only when status bar is not overlaying webview
This commit is contained in:
committed by
Andrew Grieve
parent
ccb465f807
commit
6552bddfd1
@@ -327,11 +327,12 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
|
||||
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;
|
||||
if (!self.statusBarOverlaysWebView) {
|
||||
if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation)) {
|
||||
frame.size.height += statusBarFrame.size.width;
|
||||
} else {
|
||||
frame.size.height += statusBarFrame.size.height;
|
||||
}
|
||||
}
|
||||
|
||||
self.webView.frame = frame;
|
||||
|
||||
Reference in New Issue
Block a user