Skip to content
This repository has been archived by the owner on May 3, 2021. It is now read-only.
Alexander Grebenyuk edited this page Mar 5, 2015 · 9 revisions

GIF

I don't want animated GIF support, how do I disable it?

Animated GIF support in DFImageManager is implemented as a subspec, which is installed by default. Modify your Podfile to include only Core subspec:

pod 'DFImageManager/Core'
I don't want automatic animated GIF playback on a specific view, how do I disable it?

The DFImageManager automatically starts GIF playback on DFImageView. To disable automatic playback use a allowsGIFPlayback property:

DFImageView *imageView = ...;
imageView.allowsGIFPlayback = NO;
I use -requestImageForResource:... method to request a GIF, how do I display it?

The DFImageManager will give you an instance of DFAnimatedImage : UIImage class for an image when request is complete. The DFAnimatedImage object represents a poster image for the underlying animated image. It is a regular UIImage that doesn't override any of the native UIImage behaviors and it can be used anywhere where a regular UIImage can be used.

The underlying animated image is an instance ofFLAnimatedImage : NSObject class that can be used for GIF playback in the FLAnimatedImageView : UIImageView object. To start playback set the animatedImage property of FLAnimatedImageView.

The DFImageView class is a subclass of FLAnimatedImageView (only when GIF subspec is installed) and can also be used for GIF playback. The DFImageView doesn't override any of the FLAnimatedImageView methods so should get the same experience as when using the FLAnimatedImageView class directly. The only addition is a new - (void)displayImage:(UIImage *)image method that supports DFAnimatedImage objects and will automatically start GIF playback when passed an object of that class.

Clone this wiki locally