diff --git a/Tusker/Screens/Large Image/LargeImageContentView.swift b/Tusker/Screens/Large Image/LargeImageContentView.swift index 9608c42c..f6273dbc 100644 --- a/Tusker/Screens/Large Image/LargeImageContentView.swift +++ b/Tusker/Screens/Large Image/LargeImageContentView.swift @@ -19,8 +19,10 @@ protocol LargeImageContentView: UIView { class LargeImageImageContentView: UIImageView, LargeImageContentView { + #if !targetEnvironment(macCatalyst) @available(iOS 16.0, *) private static let analyzer = ImageAnalyzer() + #endif var animationImage: UIImage? { image! } @@ -39,6 +41,7 @@ class LargeImageImageContentView: UIImageView, LargeImageContentView { contentMode = .scaleAspectFit isUserInteractionEnabled = true + #if !targetEnvironment(macCatalyst) if #available(iOS 16.0, *), ImageAnalyzer.isSupported { let interaction = ImageAnalysisInteraction() @@ -54,6 +57,7 @@ class LargeImageImageContentView: UIImageView, LargeImageContentView { } } } + #endif } required init?(coder: NSCoder) { @@ -78,12 +82,14 @@ class LargeImageImageContentView: UIImageView, LargeImageContentView { } } +#if !targetEnvironment(macCatalyst) @available(iOS 16.0, *) extension LargeImageImageContentView: ImageAnalysisInteractionDelegate { func presentingViewController(for interaction: ImageAnalysisInteraction) -> UIViewController? { return owner } } +#endif class LargeImageGifContentView: GIFImageView, LargeImageContentView { var animationImage: UIImage? { image }