Latest 0.3
Homepage https://github.com/cemolcay/GiFHUD-Swift
License MIT
Platforms ios 8.0, requires ARC
Authors

progress hud with ability to display gif images implemented with swift

Demo

alt tag

Install

pod 'GiFHUD-Swift'

Usage

  • import GIFHUD
  • Add your gif file or image sequance files to your project.
// Setup gif image
GIFHUD.shared.setGif("pika.gif")
GIFHUD.shared.show()

Thats it!

Just use GIFHUD.shared.show(with overlay:duration:) for showing the hud.
GIFHUD.shared.dismiss() for dismissing the hud.

public func setGif(named: String)
public func setGif(bundle: NSBundle)
public func SetGif(images: [UIImage])

You can set your gif with giving its String name, Bundle url or Array of UIImages.

Optional values

var size            : CGFloat           = 150
var fadeDuration    : TimeInterval      = 0.3
var gifSpeed        : CGFloat           = 0.3
var overlayAlpha    : CGFloat           = 0.3

If you want to customise the looking just edit these values

Credits

The animated gif to UIImage swift library i used:
https://github.com/kaishin/gifu

Latest podspec

{
    "name": "GiFHUD-Swift",
    "version": "0.3",
    "summary": "Progress hud for displaying only animated gif images implemented with swift",
    "description": "GiFHUD-Swiftn============nnprogress hud with ability to display gif images implemented with swiftnnDemon----nn![alt tag](https://raw.githubusercontent.com/cemolcay/GiFHUD/master/demo.gif)nnUsagen-----nnCopy & paste the GiFHUD.swift to your project. 
nAdd your gif file or image sequance files to your project.
nn //Setup GiFHUD imagen GiFHUD.setGif("pika.gif")n GiFHUD.show()nnThats it !
nnJust use `GiFHUD.show()` or `GiFHUD.showWithOverlay()` for showing the hud.
n`GiFHUD.dismiss()` for dismissing the hud.nn class func setGif (name: String)n class func setGif (bundle: NSBundle)n class func SetGif (images: Array)nnYou can set your gif with giving its `String` name, `NSBundle` url or `Array` of `UIImage`s.nnOptional valuesn---------------nn let Size : CGFloat = 150n let FadeDuration : NSTimeInterval = 0.3n let GifSpeed : CGFloat = 0.3n let OverlayAlpha : CGFloat = 0.3nnIf you want to customise the looking just edit these valuesnnnCreditsn=======nnThe animated gif to UIImage swift library i used:
nhttps://github.com/kaishin/gifu", "homepage": "https://github.com/cemolcay/GiFHUD-Swift", "license": "MIT", "authors": { "Cem Olcay": "[email protected]" }, "platforms": { "ios": "8.0" }, "source": { "git": "https://github.com/cemolcay/GiFHUD-Swift.git", "tag": "0.3" }, "source_files": "GiFHUD-Swift/GiFHUD.swift", "requires_arc": true }

Pin It on Pinterest

Share This