From 50fc41e3c29bdcc56d80655facea9ceeda63e1ac Mon Sep 17 00:00:00 2001 From: onevcat Date: Sat, 21 Sep 2024 22:45:25 +0900 Subject: [PATCH] Only need to apply on UIKit --- Sources/SwiftUI/KFAnimatedImage.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/SwiftUI/KFAnimatedImage.swift b/Sources/SwiftUI/KFAnimatedImage.swift index 4f199d625..7e1ed0b74 100644 --- a/Sources/SwiftUI/KFAnimatedImage.swift +++ b/Sources/SwiftUI/KFAnimatedImage.swift @@ -87,7 +87,10 @@ public struct KFAnimatedImageViewRepresenter: KFCrossPlatformViewRepresentable, @MainActor private func makeImageView() -> AnimatedImageView { let view = AnimatedImageView() + + #if !os(macOS) view.isUserInteractionEnabled = true + #endif self.context.renderConfigurations.forEach { $0(view) }