Update the Example and Readme

This commit is contained in:
DreamPiggy 2020-05-29 20:10:56 +08:00
parent 111a2f6b8a
commit fbd5a53e1f
2 changed files with 3 additions and 6 deletions

View File

@ -173,8 +173,7 @@ struct ContentView: View {
WebImage(url: URL(string:url), isAnimating: self.$animated)
.resizable()
.indicator(.activity)
.animation(.easeInOut(duration: 0.5))
.transition(.fade)
.transition(.fade(duration: 0.5))
.scaledToFit()
.frame(width: CGFloat(100), height: CGFloat(100), alignment: .center)
#endif
@ -187,8 +186,7 @@ struct ContentView: View {
}
*/
.indicator(.activity)
.animation(.easeInOut(duration: 0.5))
.transition(.fade)
.transition(.fade(duration: 0.5))
.scaledToFit()
.frame(width: CGFloat(100), height: CGFloat(100), alignment: .center)
}

View File

@ -122,8 +122,7 @@ var body: some View {
Rectangle().foregroundColor(.gray)
}
.indicator(.activity) // Activity Indicator
.animation(.easeInOut(duration: 0.5)) // Animation Duration
.transition(.fade) // Fade Transition
.transition(.fade(duration: 0.5)) // Fade Transition with duration
.scaledToFit()
.frame(width: 300, height: 300, alignment: .center)
}