Flipboard / FLAnimatedImage

Performant animated GIF engine for iOS
MIT License
7.93k stars 1.22k forks source link

Jump to frame #53

Open caughtinflux opened 9 years ago

caughtinflux commented 9 years ago

Is there a way to jump to a specific frame of a GIF? This would be a huge help when trying to sync two views with the same GIF.

raphaelschaad commented 9 years ago

Currently not. You might be interested in my answer to this: https://github.com/Flipboard/FLAnimatedImage/issues/52

Also be cautious about playing the same GIF in two views. You might want to copy the GIF in memory: https://github.com/Flipboard/FLAnimatedImage/issues/33

Does that help? What do you want to achieve?

caughtinflux commented 9 years ago

Right, I've added NSCopying conformance to FLAninatedImage and a custom subclass of the image view that copies the image. This definitely resolved the issue in #33. However, I have a grid of GIFs which then allows the user to tap on any one to open a single view of sorts. In this view, I'd like the two views to sync up. I'll try adding something like -[FLAnimatedImage matchCurrentFrameIndexToAnimatedImage:]

raphaelschaad commented 9 years ago

Yes, this is an interesting use case. Will you support showing both GIFs at the same time or do you just want the detail view GIF to start where the grid view GIF was playing when the user interaction happened?

In any case, let me know if you come across interesting solutions that could be pull requested to master!

caughtinflux commented 9 years ago

The latter, both views won't be visible at the same time. And I definitely shall let you know if I end up implementing something myself, but it isn't too much of a priority at this time.

caughtinflux commented 9 years ago

The latter, both views won't be visible at the same time. And I definitely shall let you know if I end up implementing something myself, but it isn't too much of a priority at this time.

younatics commented 7 years ago

+1