AnimatedImage - Infinite Run Loop - SDWebImageSwiftUI

130 Views Asked by At

I'm using AnimatedImage in my SwiftUI project and I've been facing an issue like below.

I created a card container and put AnimatedImage into it. Added a Binding to manage animation stop/start while I'm scrolling my carousel horizontally. Carousel contains n number of Animated Image in it. While scrolling I'm activating animation of the AnimatedImage in selected index. But I have some GIFs which do not support infinite loop. And AnimatedImage runs just once. If I add customLoopCount into my cards, none of my AnimatedImage components works.

Every other gif renderer libraries supports endless loop. Why there is no support in AnimatedImage ?

AnimatedImage(url: "https://sample.gif", isAnimating: $isAnimating).customLoopCount(loopCount).resizable()
0

There are 0 best solutions below