Skip to content

Commit bc96b01

Browse files
committed
Add clarity to code example
1 parent 92704a2 commit bc96b01

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,18 @@ Note: `AnimatedImage` some methods like `.transition`, `.indicator` and `.aspect
229229
Note: some of methods on `AnimatedImage` will return `some View`, a new Modified Content. You'll lose the type related modifier method. For this case, you can either reorder the method call, or use Native View in `.onViewUpdate` for rescue.
230230

231231
```swift
232+
233+
// Using UIKit components
232234
var body: some View {
233-
AnimatedImage(name: "animation2.gif") // Just for showcase, don't mix them at the same time
235+
AnimatedImage(name: "animation2.gif")
234236
.indicator(SDWebImageProgressIndicator.default) // UIKit indicator component
235-
.indicator(Indicator.progress) // SwiftUI indicator component
236237
.transition(SDWebImageTransition.flipFromLeft) // UIKit animation transition
238+
}
239+
240+
// Using SwiftUI components
241+
var body: some View {
242+
AnimatedImage(name: "animation2.gif")
243+
.indicator(Indicator.progress) // SwiftUI indicator component
237244
.transition(AnyTransition.flipFromLeft) // SwiftUI animation transition
238245
}
239246
```

0 commit comments

Comments
 (0)