【发布时间】:2018-03-21 22:51:20
【问题描述】:
在 iOS 11 中,UIWebView 通过状态栏弹出。可能会受到 iOS 11 引入的安全区域插入的影响。我尝试将属性 contentInsetAdjustmentBehavior 设置如下:
webView.scrollowView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentAlways
它有效。但是,对于某些使用 -webkit-overflow-scrolling 的页面,webView.scrollowView 有另一个 UIScrollowView(UIWebOverflowScrollView) 作为其子视图。如果我没有为该滚动视图设置属性 contentInsetAdjustmentBehavior,页面元素将下沉。如果没有为 UIWebview 的所有 scrollView 设置属性 contentInsetAdjustmentBehavior 来解决此问题的任何其他解决方案。
【问题讨论】:
标签: uiscrollview uiwebview uistatusbar ios11