Skip to content
/ GifExt Public

UIImage and UIImageView extensions to support gif animate on iOS.

Notifications You must be signed in to change notification settings

KrisYu/GifExt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GifExt

Proudly animate Gif on iOS with less than 100 lines of code.

Demo

Basically this is a copycat of SwiftGif. Differences:

  1. Play gif as it is.
  2. UIImageView load gif from URL.

Usage

Since this is just an Extension, you can just

  1. download the GifExt.swift file
  2. add it to your project.
  3. use it like as below
// create animated UIImage
let localGifURL = Bundle.main.url(forResource: "laugh", withExtension: "gif")
let gifFile = UIImage.gif(url:localGifURL!)
localImageView.image = gifFile

// load gif from web
let webGifURL = URL(string: "https://media.giphy.com/media/3og0IuvANdUUmpVeA8/giphy.gif")
webImageView.loadGif(url: webGifURL!)

About

UIImage and UIImageView extensions to support gif animate on iOS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages