A UIImage category that loads animated GIFs for iOS.
This project defines a category
animatedGIF on UIImage. The category defines two methods. This method creates an animated UIImage using the frames of the GIF in data:+[UIImage animatedImageWithAnimatedGIFData:(NSData *)data duration:(NSTimeInterval)duration]
This method creates an animated
UIImage using the frames of the GIF loaded from url:+[UIImage animatedImageWithAnimatedGIFURL:(NSURL *)url duration:(NSTimeInterval)duration]
To use this category in your own project, copy
UIImage+animatedGIF.h and UIImage+animatedGIF.m to your project, and add ImageIO.framework to the "Link Binary With Libraries" build phase of your target.
The implementation of this category is quite simple. It uses the Image I/O Framework to do all of the real work.
Author: Rob Mayoff 2012-01-27Check the below link for your reference.Thanks
https://github.com/diegopeinador/uiimage-from-animated-gif
Comments
Post a Comment