This lib was deprecated, because in iOS 15 Apple have been launched the AsyncImage with the same objetive to use AsyncImage it's look like:
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
AsyncImage(url: URL(string: "https://rickandmortyapi.com/api/character/avatar/1.jpeg"!)) { image in
image.resizable()
}
}
}
}
✨Reactive image downloader with cache support as a Image using Combine
import WPImageKit
struct ContentView: View {
var body: some View {
VStack {
WPImage(imageUrl: "https://rickandmortyapi.com/api/character/avatar/1.jpeg", placeholder: "placeholder")
}
}
}
-
You can abstract the all task to download image to put in your View.
-
Automatic Cache, don't worry in make a cache.
-
Sugar syntatic, just pass to init of WPImage, and customize your Image
- This library is avaiable in Swift Package Manager, so just install...
WPImage is under MIT license. See the LICENSE file for more info.