Open danielkramer opened 2 years ago
Maybe you need to customize the transition modifier. This is from SwiftUI, not just from SDWebImage.
There are onSuccess
modifier to let you get the cache from (whether cache or network), then you need a @State
to refresh and do transition.
For UIKit (not SwiftUI) it actually do transition from network only. Match what you want by default...
And you need forceTransition to make it do animation for all cache from type.
However, in SwiftUI there are no such a behavior, because it's not powered by UIKit and +[UIView animationWithDuration:]
Thanks for the slick library, it's working great. I have a LazyVGrid that arranges over 1000 images. I've added the .fade transition which is working great. Ideally tho if the image is already in the cache I'd like to just display it without the fade and only fade if it has to download the image from my server. Thanks for any pointers if this is possible.
Here's a simplified version of my lazyVgrid.. it's parent is a ScrollView.