2

I have looked online for many solutions on how to load a GIF in Xcode using Swift. But, all of them uses a lot of memory in the iOS App. These are the solutions I tried till yet! Could anyone please recommend me a better solution on loading a GIF in Xcode using Swift. Thanks for the help!

How to add GIF images to Assets folder and load them in UIImageView programmatically

How to load GIF image in Swift?

Pressing_Keys_24_7
  • 1,755
  • 2
  • 7
  • 33
  • I've tried [SwiftGif](https://github.com/swiftgif/SwiftGif) and [SwiftyGif](https://github.com/kirualex/SwiftyGif). I recommend SwiftyGif (takes a *lot* less memory) – aheze Oct 12 '20 at 16:57

1 Answers1

0

you have option like https://cocoapods.org/pods/Gifu framework as well

  • Thanks for the answer! I installed the framework through CocoaPods and changed the UIImage class to GIFImageView. But, could you please explain to me how can I make the GIF start animating from View Controller as I have followed the instructions but still no success. Thanks! – Pressing_Keys_24_7 Oct 12 '20 at 16:45
  • 1
    The one by Rebeloper - Rebel Developer? – Pressing_Keys_24_7 Oct 12 '20 at 16:48
  • Yes exactly https://www.youtube.com/watch?v=I1HthQ2oxUI –  Oct 12 '20 at 17:01
  • It gives an error while adding in Swift Package Manager. Any solution? – Dc7 Feb 05 '22 at 07:13