TextureGroup / Texture

Smooth asynchronous user interfaces for iOS apps.
https://texturegroup.org/
Other
8.02k stars 1.29k forks source link

[ASNetworkImageNode] Can't update URL/image after setting animated GIF #135

Open garrettmoon opened 7 years ago

garrettmoon commented 7 years ago

From @abaerlocher on July 27, 2016 13:46

We're using ASNetworkImageNode to load/display image URLs in our app. The views are recycled as new images are displayed. Occasionally, an animated GIF is displayed. Once an animated GIF URL has been set, however, it's not cleared/removed when another image URL is set. It continues to display the animated GIF.

This is easy to reproduce using the 'AnimatedGIF' sample project (included in AsyncDisplayKit v1.9.81). After running the animated GIF for a few seconds, set the image node URL to a JPEG, for example. The animated GIF will flash but continue to display. I've tried to work around this by resetting the URL and calling clearFetchedData() (this caused a deadlock). For now, the only option is to remove the image node and instantiate a new one each time.

Copied from original issue: facebookarchive/AsyncDisplayKit#1991

garrettmoon commented 7 years ago

From @hannahmbanana on August 15, 2016 20:40

@garrettmoon: is this intended behavior?

garrettmoon commented 7 years ago

No, definitely not!

mhassanpur commented 5 years ago

This is still an issue for me. I'm not using GIFs, just plain old JPG and PNG files. It doesn't seem like I can do anything to re-use the component with a new URL. I may have to re-create the component as a workaround, as @garrettmoon pointed out.