File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ EXTERNAL SOURCES:
18
18
19
19
SPEC CHECKSUMS:
20
20
SDWebImage: fb387001955223213dde14bc08c8b73f371f8d8f
21
- SDWebImageSwiftUI: 6ea3735551d25e99fdaaef00f8bcd20741e7ce95
21
+ SDWebImageSwiftUI: 37af9cb22b2c4581e09a341d88ee96ba98c21c32
22
22
23
23
PODFILE CHECKSUM: 146734166216dd8fc1597433cc675999454ed4b2
24
24
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ struct ContentView: View {
20
20
AnimatedImage ( url: URL ( string: " https://raw.githubusercontent.com/liyong03/YLGIFImage/master/YLGIFImageDemo/YLGIFImageDemo/joy.gif " ) !)
21
21
// .scaledToFit() // Apple's Bug ? Custom UIView does not passthrough the `contentMode` from Swift UI layout system into UIKit layout system
22
22
. frame ( width: 400 , height: 300 , alignment: . center)
23
+ AnimatedImage ( data: try ! Data ( contentsOf: URL ( fileURLWithPath: " /tmp/foo.webp " ) ) )
23
24
}
24
25
}
25
26
}
Original file line number Diff line number Diff line change @@ -25,13 +25,35 @@ It aims to ensure the following function available for users and try to do some
25
25
26
26
## Installation
27
27
28
+ #### CocoaPods
29
+
28
30
SDWebImageSwiftUI is available through [ CocoaPods] ( https://cocoapods.org ) . To install
29
31
it, simply add the following line to your Podfile:
30
32
31
33
``` ruby
32
34
pod ' SDWebImageSwiftUI'
33
35
```
34
36
37
+ #### Carthage
38
+
39
+ SDWebImageSwiftUI is available through [ Carthage] ( https://github.com/Carthage/Carthage ) .
40
+
41
+ ```
42
+ github "dreampiggy/SDWebImageSwiftUI"
43
+ ```
44
+
45
+ #### Swift Package Manager
46
+
47
+ SDWebImageSwiftUI is available through [ Swift Package Manager] ( https://swift.org/package-manager/ ) .
48
+
49
+ ``` swift
50
+ let package = Package (
51
+ dependencies : [
52
+ .package (url : " https://github.com/dreampiggy/SDWebImageSwiftUI.git" , .branch (" master" ))
53
+ ],
54
+ )
55
+ ```
56
+
35
57
## Usage
36
58
37
59
+ Using ` WebImage ` to load network image
@@ -51,6 +73,7 @@ var body: some View {
51
73
``` swift
52
74
var body: some View {
53
75
AnimatedImage (url : URL (string : " https://raw.githubusercontent.com/liyong03/YLGIFImage/master/YLGIFImageDemo/YLGIFImageDemo/joy.gif" )! )
76
+ AnimatedImage (data : try ! Data (contentsOf : URL (fileURLWithPath : " /tmp/foo.webp" )))
54
77
}
55
78
```
56
79
You can’t perform that action at this time.
0 commit comments