kean / Nuke

Image loading system
https://kean.blog/nuke
MIT License
8.12k stars 528 forks source link

TableViewCell Issue #175

Closed cwestMobile closed 6 years ago

cwestMobile commented 6 years ago

Let me start by saying this is an absolutely fantastic library, but I'm running into the following issue...

I am populating a UITableView with images and it is working great. Each cell has two images. The issue arises with the first two cells. In the first cell, only the first image loads...and in the second cell only the second image loads.

Outside of those two cells all the images are loading correctly. Here is the chunk of code assigning the images. If you need more information I can also send you my project. Let me know :)

`var options = ImageLoadingOptions() options.pipeline = pipeline options.transition = .fadeIn(duration: 0.25)

    if let photoUrlString = post?.answers {

        let photoOneUrl = URL(string: photoUrlString[0] as! String)
        let photoTwoUrl = URL(string: photoUrlString[1] as! String)

        Nuke.loadImage(
            with: ImageRequest(url: photoOneUrl!).processed(with: _ProgressiveBlurImageProcessor()),
            options: options,
            into: answerImageOne
        )
        Nuke.loadImage(
            with: ImageRequest(url: photoTwoUrl!).processed(with: _ProgressiveBlurImageProcessor()),
            options: options,
            into: answerImageTwo
        )
    }`

EDIT: In my pipeline configuration I added the following and it seemed to fix it...

$0.isDeduplicationEnabled = true

kean commented 6 years ago

Hey, if you could send me a sample project, please do. And please also let me know which version you're using.

$0.isDeduplicationEnabled = true

The default value is true, I think you meant false?

kean commented 6 years ago

Hey @cwestMobile, did you manage to figure out what the issue was?

cwestMobile commented 6 years ago

@kean Yeah it was just an incorrect implementation on my part. All good. Closing it out, thanks!