Skip to content

Commit c25a227

Browse files
committed
Update the readme about the installation
1 parent 7c6a74c commit c25a227

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

Example/Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ EXTERNAL SOURCES:
1818

1919
SPEC CHECKSUMS:
2020
SDWebImage: fb387001955223213dde14bc08c8b73f371f8d8f
21-
SDWebImageSwiftUI: 6ea3735551d25e99fdaaef00f8bcd20741e7ce95
21+
SDWebImageSwiftUI: 37af9cb22b2c4581e09a341d88ee96ba98c21c32
2222

2323
PODFILE CHECKSUM: 146734166216dd8fc1597433cc675999454ed4b2
2424

Example/SDWebImageSwiftUIDemo/ContentView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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
}

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
2830
SDWebImageSwiftUI is available through [CocoaPods](https://cocoapods.org). To install
2931
it, simply add the following line to your Podfile:
3032

3133
```ruby
3234
pod '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
5274
var 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

0 commit comments

Comments
 (0)