progress hud with ability to display gif images implemented with swift
Copy & paste the GiFHUD.swift to your project.
Add your gif file or image sequance files to your project.
//Setup GiFHUD image
GiFHUD.setGif("pika.gif")
GiFHUD.show()
Thats it !
Just use GiFHUD.show() or GiFHUD.showWithOverlay() for showing the hud.
GiFHUD.dismiss() for dismissing the hud.
class func setGif (name: String)
class func setGif (bundle: NSBundle)
class func SetGif (images: Array<UIImage>)
You can set your gif with giving its String name, NSBundle url or Array of UIImages.
let Size : CGFloat = 150
let FadeDuration : NSTimeInterval = 0.3
let GifSpeed : CGFloat = 0.3
let OverlayAlpha : CGFloat = 0.3
If you want to customise the looking just edit these values
The animated gif to UIImage swift library i used:
https://github.com/kaishin/gifu