Преглед изворни кода

Override initializers for tvOS

This is a workaround for apple/swift issue 66015 (https://github.com/apple/swift/issues/66015)
onevcat пре 2 година
родитељ
комит
e7275c6b52
1 измењених фајлова са 16 додато и 0 уклоњено
  1. 16 0
      Sources/Views/AnimatedImageView.swift

+ 16 - 0
Sources/Views/AnimatedImageView.swift

@@ -194,6 +194,22 @@ open class AnimatedImageView: UIImageView {
             }
             }
         }
         }
     }
     }
+
+// Workaround for Apple xcframework creating issue on Apple TV in Swift 5.8.
+// https://github.com/apple/swift/issues/66015
+#if os(tvOS)
+    public override init(image: UIImage?, highlightedImage: UIImage?) {
+        super.init(image: image, highlightedImage: highlightedImage)
+    }
+    
+    required public init?(coder: NSCoder) {
+        super.init(coder: coder)
+    }
+    
+    init() {
+        super.init(frame: .zero)
+    }
+#endif
     
     
     deinit {
     deinit {
         if isDisplayLinkInitialized {
         if isDisplayLinkInitialized {