ios: Fix hide to adjust webview's frame only when status bar is not overlaying webview

This commit is contained in:
Tiancheng Zhu 2014-04-10 16:25:47 -07:00 committed by Andrew Grieve
parent ccb465f807
commit 6552bddfd1

View File

@ -327,12 +327,13 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
CGRect frame = self.webView.frame; CGRect frame = self.webView.frame;
frame.origin.y = 0; frame.origin.y = 0;
if (!self.statusBarOverlaysWebView) {
if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation)) { if (UIDeviceOrientationIsLandscape(self.viewController.interfaceOrientation)) {
frame.size.height += statusBarFrame.size.width; frame.size.height += statusBarFrame.size.width;
} else { } else {
frame.size.height += statusBarFrame.size.height; frame.size.height += statusBarFrame.size.height;
} }
}
self.webView.frame = frame; self.webView.frame = frame;
} }