Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/117.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 缓存图像并使用Haneke显示它们_Ios_Swift_Caching_Haneke - Fatal编程技术网

Ios 缓存图像并使用Haneke显示它们

Ios 缓存图像并使用Haneke显示它们,ios,swift,caching,haneke,Ios,Swift,Caching,Haneke,我试图缓存()一个图像并显示它,但我似乎无法找出hnk\u setImage中的第一个UIImage参数。如何从logoCache键显示图像 缓存图像 cache.set(value: logoData, key: logoCache) cell.customerImageView?.hnk_setImage(UIImage?, key: logoCache) 获取并显示图像 cache.set(value: logoData, key: logoCache) cell.customerI

我试图缓存()一个图像并显示它,但我似乎无法找出
hnk\u setImage
中的第一个UIImage参数。如何从
logoCache
键显示图像

缓存图像

cache.set(value: logoData, key: logoCache)
cell.customerImageView?.hnk_setImage(UIImage?, key: logoCache)
获取并显示图像

cache.set(value: logoData, key: logoCache)
cell.customerImageView?.hnk_setImage(UIImage?, key: logoCache)
内部
cellForItemAtIndexPath
函数

var var1 = mArray[indexPath.row]

    let ImageURLKey = var1["logoCache"] as! String

if let url =  NSURL(string: "yourUrl/"+ImageURLKey) {
        cell.imageView.contentMode = UIViewContentMode.ScaleAspectFit
         cell.imageView.hnk_setImageFromURL(url)

    }

这是怎么回答这个问题的?