You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,23 +7,23 @@
7
7
This Swift package provides a wrapper view around the existing **SwiftUI**`Image view` which adds support for showing and caching remote images.
8
8
In addition you can specify a loading and error view.
9
9
10
-
You can display images from a specific URL or from the iCloud (through a `PHAsset` identifier).
10
+
You can display images from a specific **URL** or from the **iCloud** (through a `PHAsset` identifier).
11
11
12
-
## Installation
12
+
## 💡 Installation
13
13
14
14
Add this Swift package in Xcode using its Github repository url. (File > Swift Packages > Add Package Dependency...)
15
15
16
-
## How to use
16
+
## 🧭 How to use
17
17
18
18
Just pass a remote image url or the local identifier of a `PHAsset` and `ViewBuilder`s for the error, image and loading state to the initializer. That's it 🎉
19
19
20
20
Clear the image cache through `RemoteImageService.cache.removeAllObjects()`.
21
21
22
-
## Examples
22
+
## 📖 Examples
23
23
24
24
The following code truly highlights the **simplicity** of this view:
25
25
26
-
URL example:
26
+
**URL example:**
27
27
```swift
28
28
let url =URL(string: "https://images.unsplash.com/photo-1524419986249-348e8fa6ad4a?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1950&q=80")!
29
29
@@ -38,7 +38,7 @@ RemoteImage(type: .url(url), errorView: { error in
38
38
})
39
39
```
40
40
41
-
PHAsset example:
41
+
**PHAsset example:**
42
42
```swift
43
43
44
44
RemoteImage(type: .phAsset(localIdentifier: "541D4013-D51C-463C-AD85-0A1E4EA838FD"), errorView: { error in
0 commit comments