-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid setting the imageView.image to nil before it has finished downloading image #494
Comments
I'll suggest to just use the current image of image view as the placeholder as you mentioned. It should be a fairly good and reasonable solution, at least to me. What's your concern about that? |
I guess it can work yeah, but it would feel 'safer' if there was a feature where you could wait setting the image in the imageview until the image has finished downloaded. I know that's possible with AlamofireImage, but I just prefer Kingfisher way more 👍 |
And thank you for the quick response! Really appreciate it. |
Um, I agree with you that it will be clearer to have an option to describe it explicitly, instead of just using current image. I will find some time to implement this. Thanks. |
Added in 3.2.0 |
I have a feed of images (sort of like snapchat), so everytime I tap on the imageview i get the next prefetched image.
When using .kf.setImage it seems like for a split second it sets the imageView.image to nil before setting the cached/downloaded image in the imageview, which causes a flicker where it briefly shows the imageViews background color.
Is there a way to avoid this? Thought about setting the previous displayed image as a placeholder for the new one, but that's not the best solution.
So, is there a way one can wait setting the imageView's image until the image has actually completed downloading?
The text was updated successfully, but these errors were encountered: