From ec101e5fca686ffcd4663239dc55653ec2a5fe9f Mon Sep 17 00:00:00 2001 From: Balazs Perlaki-Horvath Date: Sat, 5 Oct 2024 21:32:04 +0200 Subject: [PATCH] Avoid crash on iOS 18 --- Views/BuildingBlocks/WebView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Views/BuildingBlocks/WebView.swift b/Views/BuildingBlocks/WebView.swift index 6b968698..8f6d59e0 100644 --- a/Views/BuildingBlocks/WebView.swift +++ b/Views/BuildingBlocks/WebView.swift @@ -122,7 +122,9 @@ final class WebViewController: UIViewController { override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() - webView.setValue(view.safeAreaInsets, forKey: "_obscuredInsets") + if #unavailable(iOS 18.0) { + webView.setValue(view.safeAreaInsets, forKey: "_obscuredInsets") + } layoutSubject.send() } }