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:
1818
1919SPEC CHECKSUMS:
2020 SDWebImage: fb387001955223213dde14bc08c8b73f371f8d8f
21- SDWebImageSwiftUI: 6ea3735551d25e99fdaaef00f8bcd20741e7ce95
21+ SDWebImageSwiftUI: 37af9cb22b2c4581e09a341d88ee96ba98c21c32
2222
2323PODFILE CHECKSUM: 146734166216dd8fc1597433cc675999454ed4b2
2424
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ struct ContentView: View {
2020 AnimatedImage ( url: URL ( string: " https://raw.githubusercontent.com/liyong03/YLGIFImage/master/YLGIFImageDemo/YLGIFImageDemo/joy.gif " ) !)
2121// .scaledToFit() // Apple's Bug ? Custom UIView does not passthrough the `contentMode` from Swift UI layout system into UIKit layout system
2222 . frame ( width: 400 , height: 300 , alignment: . center)
23+ AnimatedImage ( data: try ! Data ( contentsOf: URL ( fileURLWithPath: " /tmp/foo.webp " ) ) )
2324 }
2425 }
2526}
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
2525
2626## Installation
2727
28+ #### CocoaPods
29+
2830SDWebImageSwiftUI is available through [ CocoaPods] ( https://cocoapods.org ) . To install
2931it, simply add the following line to your Podfile:
3032
3133``` ruby
3234pod ' SDWebImageSwiftUI'
3335```
3436
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+
3557## Usage
3658
3759+ Using ` WebImage ` to load network image
@@ -51,6 +73,7 @@ var body: some View {
5173``` swift
5274var body: some View {
5375 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" )))
5477}
5578```
5679
You can’t perform that action at this time.
0 commit comments