0

I'm trying to cache (Haneke) an image and show it but i can't seem to figure out the first UIImage parameter in the hnk_setImage. How can i show the image from the logoCache key?

Cache Image

cache.set(value: logoData, key: logoCache)

Fetch and Show Image

cell.customerImageView?.hnk_setImage(UIImage?, key: logoCache)
4

1 回答 1

0
var mArray = [[String:AnyObject]]()

inside cellForItemAtIndexPath function

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)

    }
于 2016-08-08T13:52:01.527 回答