NSAsyncCachedImage

1.1.1

Lightweight way to load and cache images asynchronously in SwiftUI views
nssina/NSAsyncCachedImage

What's New

v1.1.1

2023-05-01T16:27:07Z

• Fix compile error on Xcode 14.3

NSAsyncCachedImage

Swift Package Manager compatible

NSAsyncCachedImage is a lightweight package which provides the main thing that is missing from Apple AsyncImage API, Caching!. This package will let you download and cache images asynchronously in SwiftUI views.

Supported Platforms

NSAsyncCachedImage supports iOS 13, macOS 10.15, tvOS 13 and watchOS 6.

Installation

NSAsyncCachedImage can be installed with the Swift Package Manager:

https://github.com/nssina/NSAsyncCachedImage.git

Usage

import SwiftUI
import NSAsyncCachedImage

struct ContentView: View {
    var body: some View {
        VStack {
            NSAsyncCachedImage("https://example.com/icon.png") { image in
                image
                    .resizable()
            } placeHolder: {
                ProgressView()
            }
            .frame(width: 200, height: 200)
            .cornerRadius(12)
        }
        .padding()
    }
}

License

The project is available under MIT Licence

Description

  • Swift Tools 5.7.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sat Oct 19 2024 07:23:33 GMT-0900 (Hawaii-Aleutian Daylight Time)