SDWebImage / SDWebImageSwiftUI

SwiftUI Image loading and Animation framework powered by SDWebImage
https://sdwebimage.github.io/SDWebImageSwiftUI
MIT License
2.1k stars 216 forks source link

AnimatedImage - CustomLoopCount Conflict #264

Closed erkutbas0 closed 4 months ago

erkutbas0 commented 1 year ago

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()

dreampiggy commented 4 months ago

This is supported in the code. I guess maybe a old version bug ?