URLBar shouldn't show cancel button on iPad, visual tweaks

This commit is contained in:
James Magahern
2020-07-31 14:23:00 -07:00
parent ad85c3dc23
commit 2eec003a84
4 changed files with 18 additions and 10 deletions

View File

@@ -67,7 +67,6 @@ class BrowserView: UIView
override func layoutSubviews() {
super.layoutSubviews()
webView?.frame = bounds
var webViewContentInset = UIEdgeInsets()
@@ -101,9 +100,9 @@ class BrowserView: UIView
}
// Fix web view content insets
webView?.scrollView.automaticallyAdjustsScrollIndicatorInsets = false
webView?.scrollView.contentInset = webViewContentInset.subtracting(safeAreaInsets)
webView?.scrollView.scrollIndicatorInsets = webViewContentInset
if let webView = webView {
webView.scrollView.layer.masksToBounds = false // allow content to draw under titlebar/toolbar
webView.frame = bounds.inset(by: webViewContentInset)
}
}
}