Ver Fonte

Only need to apply on UIKit

onevcat há 1 ano atrás
pai
commit
50fc41e3c2
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      Sources/SwiftUI/KFAnimatedImage.swift

+ 3 - 0
Sources/SwiftUI/KFAnimatedImage.swift

@@ -87,7 +87,10 @@ public struct KFAnimatedImageViewRepresenter: KFCrossPlatformViewRepresentable,
     @MainActor
     @MainActor
     private func makeImageView() -> AnimatedImageView {
     private func makeImageView() -> AnimatedImageView {
         let view = AnimatedImageView()
         let view = AnimatedImageView()
+        
+        #if !os(macOS)
         view.isUserInteractionEnabled = true
         view.isUserInteractionEnabled = true
+        #endif
         
         
         self.context.renderConfigurations.forEach { $0(view) }
         self.context.renderConfigurations.forEach { $0(view) }