iOS 11 UIWebView pop down by status bar

Viewed 7456

In iOS 11, UIWebView is pop down by status bar. It may be affected by safe area inset introduced by iOS 11. I try to set the property contentInsetAdjustmentBehavior as below:

webView.scrollowView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentAlways

It works. However, for some page using -webkit-overflow-scrolling, webView.scrollowView has another UIScrollowView(UIWebOverflowScrollView) as its subview. If I do not set the property contentInsetAdjustmentBehavior for that scrollView, the page elements will sink. If any other solution for this issue without setting the property contentInsetAdjustmentBehavior for all the scrollView of UIWebview.

3 Answers
Related