Skip to content

Commit 336d3f6

Browse files
authored
Merge pull request #187 from rufmirza/readme_corrections
Readme corrections
2 parents 5938dd0 + bc96b01 commit 336d3f6

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ var body: some View {
208208
.playbackRate(2.0) // Playback speed rate
209209

210210
// Bundle (not Asset Catalog)
211-
AnimatedImage(name: "animation1", isAnimating: $isAnimating)) // Animation control binding
211+
AnimatedImage(name: "animation1.gif", isAnimating: $isAnimating) // Animation control binding
212212
.maxBufferSize(.max)
213213
.onViewUpdate { view, context in // Advanced native view coordinate
214214
// AppKit tooltip for mouse hover
@@ -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") // 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)