An image loading and caching framework for SwiftUI using Combine.
This framework respects ImagePipeline, but cutting off image process feature.
By using RemoteImage confirming to SwiftUI.View, fetch image with URL and cache on memory.
var body: some View {
RemoteImage(url: url, defaultImage: defaultImage)
}
let pipeline = ImagePipeline()
pipeline.load(url)
.sink { (completion) in
} receiveValue: { (image) in
}
}
.store(in: &cancellables)
✅ PNG
✅ JPEG
✅ GIF
✅ WebP
Note: watchOS is not supported now since SnapshotTesting is not supported for watchOS.
Only support via Swift package manager installation.
dependencies: [
.package(url: "https://github.com/d-date/ImagePipelineCombine.git", from: "0.1.0")
]
link |
Stars: 15 |
Last commit: 2 years ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics