Просмотр исходного кода

Override initializers for tvOS

This is a workaround for apple/swift issue 66015 (https://github.com/apple/swift/issues/66015)
onevcat 2 лет назад
Родитель
Сommit
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 {
         if isDisplayLinkInitialized {