Enable find interaction on iOS 16

This commit is contained in:
Shadowfacts 2022-06-09 23:28:40 -04:00
parent b79c8af12c
commit 382826bfff
1 changed files with 3 additions and 0 deletions

View File

@ -70,6 +70,9 @@ class ReadViewController: UIViewController {
// transparent background required to prevent white flash in dark mode, just using .appBackground doesn't work // transparent background required to prevent white flash in dark mode, just using .appBackground doesn't work
webView.isOpaque = false webView.isOpaque = false
webView.backgroundColor = .clear webView.backgroundColor = .clear
if #available(iOS 16.0, *) {
webView.isFindInteractionEnabled = true
}
if let content = itemContentHTML() { if let content = itemContentHTML() {
webView.loadHTMLString(content, baseURL: item.url) webView.loadHTMLString(content, baseURL: item.url)
} }