🚧 Under Construction 🚧
Picture is a useful Swift Package Manager project that simplifies the process of displaying multiple images in SwiftUI. It supports both local and remote images and handles the UI, loading, and caching of images. Picture is an excellent tool for enhancing the visual appeal of apps while reducing the time and effort required for image loading and caching.
// Single Image or UIImage
var body: some View {
Picture(image: image)
}
// Single URL
var body: some View {
Picture(url: imageURL)
}
// Multiple Images or UIImages
var body: some View {
Picture(images: images)
}
// Multiple URLs
var body: some View {
Picture(urls: imageURLs)
}
// Multiple URLs or Images
let remoteAndLocalImages: [PictureSource] = [
.local(image),
.remote(url)
]
var body: some View {
Picture(remoteAndLocalImages)
}
public init(sources: [PictureSource]) {
self.sources = sources
}
To integrate Picture into your project using Swift Package Manager, simply add the following dependency to your Package.swift
file:
dependencies: [
.package(url: "<https://github.com/0xOpenBytes/Picture.git>", from: "1.0.0")
]
Picture is available under the MIT license. See the LICENSE file for more info.