GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - SDWebImage/SDWebImageFLPlugin: A SDWebImage plugin to support GIF using FLAnimatedImage and category

This repository was archived by the owner on Aug 3, 2022. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

59 Commits
59 Commits

Folders and files

NameName
Last commit message
Last commit date
Example
Example
 
 
SDWebImageFLPlugin.xcodeproj
SDWebImageFLPlugin.xcodeproj
 
 
SDWebImageFLPlugin
SDWebImageFLPlugin
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
Cartfile
Cartfile
 
 
Cartfile.resolved
Cartfile.resolved
 
 
LICENSE
LICENSE
 
 
Package.swift
Package.swift
 
 
README.md
README.md
 
 
SDWebImageFLPlugin.podspec
SDWebImageFLPlugin.podspec
 
 

Repository files navigation

SDWebImageFLPlugin

CI Status Version License Platform SwiftPM compatible 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.

Code which previously use FLAnimatedImage with SDWebImage can continue to work with this plugin. But it's recommended to use the 5.0 Animated Image Solution to get better support and more features.

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 using the wrapper class SDFLAnimatedImage.

  • 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 9+
  • Xcode 11+

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.

github "SDWebImage/SDWebImageFLPlugin"

Swift Package Manager (Xcode 11+)

SDWebImageFLPlugin is available through Swift Package Manager.

let package = Package(
    dependencies: [
        .package(url: "https://github.com/SDWebImage/SDWebImageFLPlugin.git", from: "0.6.0")
    ]
)

Author

DreamPiggy, [email protected]

License

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

About

A SDWebImage plugin to support GIF using FLAnimatedImage and category

Topics

carthagecocoapodsflanimatedimagegifimageiosobjective-csdwebimage

Resources

Readme
MIT license
Activity
Custom properties

Stars

26 stars

Watchers

6 watching

Forks

18 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.