Replies: 3 comments
-
|
That’s an interesting issue. It sounds like the .fade(duration:) modifier isn’t disabling the animation when the image loads from the network, which is definitely frustrating. The .animation(nil) trick used to work well, but since it’s deprecated, there might not be a direct replacement yet. You could try applying .withAnimation(nil) in the onSuccess block or check if Kingfisher’s newer API supports a conditional fade for network vs. cache loads. Hopefully, they add a cleaner way to handle this in future updates. |
Beta Was this translation helpful? Give feedback.
-
|
You can disable the load animation by using Kingfisher’s transition options instead of the deprecated .animation(nil). Applying .fade(.none) on KFImage removes the loading animation for both cached and network images. Example: KFImage.url(url).fade(.none). This avoids warnings and gives consistent behavior. |
Beta Was this translation helpful? Give feedback.
-
|
Kingfisher’s own fade effect is separate from SwiftUI’s animation system, so removing it there usually does the trick. If you’re still seeing a transition, make sure no parent view has implicit animations applied |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Trying to disable the image load animation when a image is loaded from the network and not the cache.
Ive tried setting
.fade(duration: 0.0)but have only been able to remove this animation with the depreciated.animation(nil)modifier.This works for me, but was curious if theres a better way to do this. Any help appricated!
Beta Was this translation helpful? Give feedback.
All reactions