소스 검색

Only need to apply on UIKit

onevcat 1 년 전
부모
커밋
50fc41e3c2
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      Sources/SwiftUI/KFAnimatedImage.swift

+ 3 - 0
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) }