madsleejensen / react-native-image-sequence

native implementation for creating frame based image animations
MIT License
107 stars 67 forks source link

fix: iOS last image now is shown after animation completes #41

Open richardPFisk opened 3 years ago

richardPFisk commented 3 years ago

Problem

Displaying a non-repeating sequence of images on iOS results in the image-view going blank after the animation has finished.

On Android, it does retain the last image of the sequence.

A proposed solution

If the overall UIImageView image is set before the animation has started, the last image stays on screen after the animation is finished.

stack-overflow uiimageview fix

This also makes the behaviour of iOS the same as Android.

Also, thanks for developing the react-native-image-sequence in the first place :)

papidb commented 3 years ago

Forked and used the library from @richardPFisk and it works perfectly. Would really appreciate it if this got merged into this library. Thanks for making this.