修复页面顶部上移的问题

This commit is contained in:
zher52 2021-05-10 11:19:44 +08:00
parent 2fe3ef9096
commit 74549a01ce

View File

@ -1109,19 +1109,12 @@ BOOL isExiting = FALSE;
self.titleBackButton.hidden = NO;
CGRect webViewBounds = self.view.bounds;
webViewBounds.size.height -= TITLEBAR_HEIGHT;
webViewBounds.origin.y =TITLEBAR_HEIGHT;
float offsetY=self.view.safeAreaLayoutGuide.layoutFrame.origin.y + 21.0 + self.view.safeAreaInsets.top + TITLEBAR_HEIGHT;
webViewBounds.size.height -= offsetY;
webViewBounds.origin.y =offsetY;
[self setWebViewFrame:webViewBounds];
} else {
// self.titleBackButton.hidden = YES;
//
// if (titleBarVisible) {
// CGRect webViewBounds = self.view.bounds;
// webViewBounds.size.height -= TOOLBAR_HEIGHT;
// [self setWebViewFrame:webViewBounds];
// } else {
[self setWebViewFrame:self.view.bounds];
// }
[self setWebViewFrame:self.view.bounds];
}
}
-(void) viewDidLayoutSubviews{