Use navBarHeight for the ... nav bar height

This commit is contained in:
Jackson Harper
2022-02-17 21:22:19 -08:00
parent d7d4131f9f
commit e757dbfe68

View File

@ -29,13 +29,13 @@ import WebKit
let webView = WebView(frame: CGRect.zero)
let contentController = WKUserContentController()
webView.scrollView.contentInset.top = LinkItemDetailView.navBarHeight
webView.navigationDelegate = context.coordinator
webView.isOpaque = false
webView.backgroundColor = UIColor.clear
webView.configuration.userContentController = contentController
webView.scrollView.delegate = context.coordinator
webView.scrollView.scrollIndicatorInsets = UIEdgeInsets(top: 50, left: 0, bottom: 0, right: 0)
webView.scrollView.contentInset.top = LinkItemDetailView.navBarHeight
webView.scrollView.scrollIndicatorInsets = UIEdgeInsets(top: LinkItemDetailView.navBarHeight, left: 0, bottom: 0, right: 0)
for action in WebViewAction.allCases {
webView.configuration.userContentController.add(context.coordinator, name: action.rawValue)