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,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;