Search code examples
swiftanimationanimated-gif

How to display GIF in app?


i am trying to load gif in my project as per my requirement to show animation, i have used third-party lib for showing gif animation, i have copied same code from demo project but not working in my project.

Here is my code :

let animatedGif = UIImage.gif(name: "loading")

Solution

  • As @Patrick suggested, you have to replace your image path from asset folder and move it in your app’s bundle. This issue is also raised in its official git library’s issue tab. https://github.com/bahlo/SwiftGif/issues/67.