Skip to content

Conversation

dreampiggy
Copy link
Collaborator

@dreampiggy dreampiggy commented Oct 25, 2019

Indicator

  • AnimatedImage

Use the SDWebImageIndicator for implementation, already supported by SDWebImage

  • WebImage

Create a new struct Indicator, which allows to receive a closure with two args, one Binding<Bool> for animation, another Binding<CGFLoat> for progress control. Which is also the design like SDWebImage

Create the all convienet methods like ActivityIndicator/ProgressIndicator using System type. WatchOS does not support any system UI element, sadlly. Use your own (See ProgressBar in example)

Transition

  • AnimatedImage

Use the SDWebImageTransition for implementation, already supported by SDWebImage

  • WebImage

SwiftUI provide a really good implementationi AnyTransition, you can use .transition(_:) modifier. So we don't need to do anything for this. Updated example to enable transition (fade with 0.5 seconds)

@dreampiggy dreampiggy force-pushed the feature_indicator_transition branch from 3e0603b to aaff0d7 Compare October 25, 2019 20:31
…sure syntax, which is more convenient and swifty
@dreampiggy dreampiggy force-pushed the feature_indicator_transition branch from aaff0d7 to 63b6da1 Compare October 25, 2019 20:36
@dreampiggy dreampiggy merged commit 6dc0002 into master Oct 25, 2019
@dreampiggy dreampiggy deleted the feature_indicator_transition branch October 26, 2019 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant