progress hud with ability to display gif images implemented with swift
pod 'GiFHUD-Swift'- 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.
var size : CGFloat = 150
var fadeDuration : TimeInterval = 0.3
var gifSpeed : CGFloat = 0.3
var overlayAlpha : CGFloat = 0.3If you want to customise the looking just edit these values
The animated gif to UIImage swift library i used:
https://github.com/kaishin/gifu