I want to use the image GIF type which named 'myAssetsGifName', presenting in my project(An App).
For example, I want to reach something just like this GIF:
I did some research before I asking this question.(Link1, Link2, Link3 for Watch OS, Link4 5 years ago...)
However, I didn't find any available solution or example to successfully present the GIF in SwiftUI.
Some of these references or posts are out-of-date. I did try these references's solutions, still not working in SwiftUI. So there are less info can be referenced. I want to reach these goals:
- I can use Image params to call the gif from my assets.
Image("myAssetsGifName")
I can using the url to download the gif and show it(passing that to Image). Just found a possible direction about second issue. Link
If I cannot use Image params to present my GIF from local assets or url downloading. Is there any possible solution could satisfy the needs? (e.g., Using UIViewRepresentable or something else?)
Does anyone know the answer. Which way should I learn from it and using it to reach my goals?
Any help or advice will be greatly appreciated. Thanks a lot!