SDWebImageSwiftUI icon indicating copy to clipboard operation
SDWebImageSwiftUI copied to clipboard

AnimatedImage - CustomLoopCount Conflict

Open erkutbas0 opened this issue 2 years ago • 0 comments

Hi,

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: Cloudinary.transform(url: url, contentType: .animatedImage), isAnimating: $isAnimating) .customLoopCount(loopCount) .resizable()

erkutbas0 avatar May 10 '23 20:05 erkutbas0