dmytro-anokhin / url-image

AsyncImage before iOS 15. Lightweight, pure SwiftUI Image view, that displays an image downloaded from URL, with auxiliary views and local cache.
MIT License
1.1k stars 96 forks source link

Add the option to animate image loading. Implements #51 #144

Closed victorpimentel closed 3 years ago

victorpimentel commented 3 years ago

First of all, thank you for this awesome project! I noticed that there was no support for animations and I wanted to contribute so there is it 😄

By default, the previous behaviour is maintained, that is, no animations. Only when the new options are set the animations will be triggered. The user can decide the curve and the duration (or just use Animation.default), but it will always do a fade animation.

I've split the animations in two, because maybe someone wants to animate the loading of images only when they appear from the network or not.

Please let me know if I need to do any change, I'll be happy to do it!

planecore commented 2 years ago

Why didn't this get in?