onevcat 9 лет назад
Родитель
Сommit
cd5902960e
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      Demo/Kingfisher-Demo/ViewController.swift
  2. 1 1
      Sources/Image.swift

+ 1 - 1
Demo/Kingfisher-Demo/ViewController.swift

@@ -34,7 +34,7 @@ class ViewController: UICollectionViewController {
         // Do any additional setup after loading the view, typically from a nib.
         title = "Kingfisher"
         
-        if #available(iOS 10.0, *) {
+        if #available(iOS 10.0, tvOS 10.0, *) {
             collectionView?.prefetchDataSource = self
         }
     }

+ 1 - 1
Sources/Image.swift

@@ -292,7 +292,7 @@ extension Kingfisher where Base: Image {
             guard let (images, gifDuration) = decode(from: imageSource, for: options) else {
                 return nil
             }
-            var image = Image(data: data)
+            let image = Image(data: data)
             image?.kf.images = images
             image?.kf.duration = gifDuration