Prevent web view flashing white when in loading in dark mode

This commit is contained in:
Shadowfacts 2022-01-11 14:58:23 -05:00
parent 85819ea6aa
commit e1296223fe
1 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,9 @@ class ReadViewController: UIViewController {
webView.translatesAutoresizingMaskIntoConstraints = false
webView.navigationDelegate = self
webView.uiDelegate = self
// transparent background required to prevent white flash in dark mode, just using .appBackground doesn't work
webView.isOpaque = false
webView.backgroundColor = .clear
if let content = itemContentHTML() {
webView.loadHTMLString(content, baseURL: item.url)
}