Latest 0.2.1
Homepage https://github.com/SDWebImage/SDWebImageFLPlugin
License MIT
Platforms ios 8.0
Dependencies SDWebImage/Core, FLAnimatedImage
Authors

CI Status
Version
License
Platform
Carthage compatible
codecov

Starting with the SDWebImage 5.0 version, we move the FLAnimatedImage support code from the Core Repo to this stand-alone repo. Core which previously use FLAnimatedImage with SDWebImage can continue to work with this plugin.

What’s for

SDWebImageFLPlugin is a plugin for SDWebImage framework, which provide the image loading support for FLAnimatedImage animated GIF engine.

By using SDWebImageFLPlugin, you can use all you familiar SDWebImage’s loading method, on the FLAnimatedImageView, which is the base component of FLAnimatedImage.

To use it, simply make sure you use FLAnimatedImageView instead of UIImageView and import this plugin.

Usage

To load images from network, just simply call the View Category method like normal UIImageView.

  • Objective-C
FLAnimatedImageView *imageView;
[imageView sd_setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.gif"]];
  • Swift
let imageView: FLAnimatedImageView
imageView.sd_setImage(with: URL(string: "http://www.domain.com/path/to/image.gif"))

The magic because we create one custom animation class called SDFLAnimatedImage to load GIF images, and use UIImage for normal images.

For placeholder, you can even provide a FLAnimatedImage to allow GIF placeholder on FLAnimatedImageView

  • Objective-C
FLAnimatedImageView *imageView;
FLAnimatedImage *animatedImage = [FLAnimatedImage animatedImageWithGIFData:gifData];
SDFLAnimatedImage *placeholder = [[SDFLAnimatedImage alloc] initWithAnimatedImage:animatedImage];
[imageView sd_setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.gif"] placeholderImage:placeholder];
  • Swift
let imageView: FLAnimatedImageView
let animatedImage = FLAnimatedImage(animatedGIFData: gifData)
let placeholder = SDFLAnimatedImage(animatedImage: animatedImage)
imageView.sd_setImage(with: URL(string: "http://www.domain.com/path/to/image.gif"), placeholderImage: placeholder)

Requirements

  • iOS 8+
  • Xcode 9+

Installation

CocoaPods

SDWebImageFLPlugin is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'SDWebImageFLPlugin'

Carthage

SDWebImageFLPlugin is available through Carthage.

Note that because the dependency SDWebImage currently is in beta. You should use Carthage v0.30.1 or above to support beta sem-version.

github "SDWebImage/SDWebImageFLPlugin"

Author

DreamPiggy, [email protected]

License

SDWebImageFLPlugin is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "SDWebImageFLPlugin",
    "version": "0.2.1",
    "summary": "A FLAnimatedImage plugin for SDWebImage",
    "description": "This project adds a plugin for FLAnimatedImage into SDWebImage, for loading animated images. FLAnimatedImage is a performant library that handles animated images rendering, while SDWebImage takes care of downloading, caching and loading the images.",
    "homepage": "https://github.com/SDWebImage/SDWebImageFLPlugin",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "DreamPiggy": "[email protected]"
    },
    "source": {
        "git": "https://github.com/SDWebImage/SDWebImageFLPlugin.git",
        "tag": "0.2.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": [
        "SDWebImageFLPlugin/Classes/**/*",
        "SDWebImageFLPlugin/Module/SDWebImageFLPlugin.h"
    ],
    "module_map": "SDWebImageFLPlugin/Module/SDWebImageFLPlugin.modulemap",
    "dependencies": {
        "SDWebImage/Core": [
            ">= 5.0.0-beta3"
        ],
        "FLAnimatedImage": [
            ">= 1.0.11"
        ]
    }
}

Pin It on Pinterest

Share This