Kingfisher: ImageTransition not working

Created on 15 Feb 2016  路  5Comments  路  Source: onevcat/Kingfisher

Hi.

I am having trouble getting ImageTransition to work. I have the exact same example that is displayed in the README.

imageView.kf_setImageWithURL(NSURL(string: "your_image_url")!, placeholderImage: nil, optionsInfo: [.Transition(ImageTransition.Fade(1))])

Tried different animations, none of them worked. Also tried different time intervals, didn't help either. The image I am loading from URL is displayed instantly, with no animation.

iOS 9, XCode 7, KingFisher (2.0.2).

Most helpful comment

Currently, the image transition will only work when the image is downloaded. Support for forcing transition is in plan but not implemented yet.

Just ran into this same behavior; did this never get implemented? Should I do a PR? 馃槃

All 5 comments

Currently, the image transition will only work when the image is downloaded. Support for forcing transition is in plan but not implemented yet.

Could you please try to clean your cache & try to see whether it works?

Thank you for clearing that up for me, it does work as intended when I clear the cache. I use Kingfisher to switch between images in a view and sometimes it flashes the view background color before loading the image. Is that an indication of using the disk cache?

Thanks again.

Maybe this will help? #228

Currently, the image transition will only work when the image is downloaded. Support for forcing transition is in plan but not implemented yet.

Just ran into this same behavior; did this never get implemented? Should I do a PR? 馃槃

Funnily enough, I am doing another project and find myself running into this again, and back at this same issue two years later.

...I suppose I should pull up the previous project and find out what I did to get around this 馃槩

EDIT: Ah! We have .forceTransition now from #317 and it works great! Thank you @onevcat you're awesome!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

indrajitsinh picture indrajitsinh  路  5Comments

joebenton picture joebenton  路  4Comments

SURYAKANTSHARMA picture SURYAKANTSHARMA  路  4Comments

rainerjungwirth picture rainerjungwirth  路  4Comments

vCrespoP picture vCrespoP  路  3Comments