When a user selects a GIF, I want to present an overlay on top of everything showing the GIF.
I know there's a few ways on iOS to do this. There's the great UIImage+animatedGIF which works decently well, but for longer GIFs they're very slow and don't play back at the same speed as a UIWebView would (which plays at the accurate playback speed).
It sucks, because if that category didn't play them back slowly it would do everything I need.
But it doesn't, so I tried with UIWebView, however I'm confused about three things:
How do I get size that the UIWebView should be when presented (its frame)? Would I have to download the GIF first as a UIImage then check its
size
property? Is there a better way (might take awhile)?How do I stop it from playing until it's fully loaded?
With the above category, as it's just a UIImage, when I embed it as a UIImageView in a scrollview it's very easy to zoom in and out of. Is this possible with a UIWebview?