Skip to content

Commit d23f9b4

Browse files
committed
Update the readme with more example code
1 parent 840b672 commit d23f9b4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,15 @@ var body: some View {
8585
```swift
8686
var body: some View {
8787
Group {
88-
AnimatedImage(url: URL(string: "https://raw.githubusercontent.com/liyong03/YLGIFImage/master/YLGIFImageDemo/YLGIFImageDemo/joy.gif"))
88+
AnimatedImage(url: URL(string: "https://raw.githubusercontent.com/liyong03/YLGIFImage/master/YLGIFImageDemo/YLGIFImageDemo/joy.gif")) // Network
8989
.onFailure(perform: { (error) in
9090
// Error
9191
})
9292
.scaledToFit()
93-
AnimatedImage(data: try! Data(contentsOf: URL(fileURLWithPath: "/tmp/foo.webp")))
93+
AnimatedImage(data: try! Data(contentsOf: URL(fileURLWithPath: "/tmp/foo.webp"))) // Data
9494
.customLoopCount(1)
95+
AnimatedImage(name: "animation1") // Bundle (not Asset Catalog)
96+
.maxBufferSize(.max)
9597
}
9698
}
9799
```

0 commit comments

Comments
 (0)