Skip to content
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

Three UX issues with PINAnimatedImageView & GIFs #536

Open
Jarred-Sumner opened this issue Nov 27, 2019 · 0 comments
Open

Three UX issues with PINAnimatedImageView & GIFs #536

Jarred-Sumner opened this issue Nov 27, 2019 · 0 comments

Comments

@Jarred-Sumner
Copy link

Jarred-Sumner commented Nov 27, 2019

I'm rendering several PINAnimatedImageView in a UIScrollView. As the user scrolls, it sets isPlaybackPaused to true when shown on screen and false when off screen. Overall, I really like this library. The performance of my app is meaningfully better than the other two libraries I integrated before this.

There are three UX issues that I'd like to report.

1. When PINAnimatedImageView is initially paused, it does not display the cover image

When/how is the cover image displayed?

I've noticed that whenever isPlaybackPaused is set to true before the image loads, the coverImage is never displayed, so the user sees an empty UIView and its sad.

Expected behavior: Even while paused, render the cover image once the image loads.

2. Pausing playback makes the PINAnimatedImageView display nothing

Currently, when isPlaybackPaused is false, the PINAnimatedImageView displays nothing. If there's any delay between pausing and unpausing (such as, the JS bridge when using this library in a React Native app), there are brief moments of black nothingness where the most recently played frame is supposed to go.

Expected behavior: Display the last image rendered before the animation was paused (maybe not setting frameImage to nil would work?)

I spent a couple of hours investigating this today. I think the image frame is being released here:

[_animatedImage clearAnimatedImageCache];

3. isPlaybackPaused stops instead of pauses

stopAnimating, (which isPlaybackPaused calls) causes the PINCachedAnimatedImage to start over from the first frame the next time startAnimating is called. This appears to be a deliberate implementation detail. Is resume a thing other people care about too or is it just me?

Its quite likely that 1 and 2 are the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants