Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Support indicator and transition on WebImage/AnimatedImage #26

Merged
merged 9 commits into from
Oct 25, 2019

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant