AsyncImage
AsyncImage copied to clipboard
Asynchronous Image Loading from URL in SwiftUI
Hi, in your [blog post](https://www.vadimbulavin.com/asynchronous-swiftui-image-loading-from-url-with-combine-and-swift/) in listing `struct ContentView: View { let url = URL(string: "https://image.tmdb.org/t/p/original/pThyQovXQrw2m0s9x82twj48Jq4.jpg")! var body: some View { AsyncImage( url: url, placeholder: Text("Loading ...") ).aspectRatio(contentMode: .fit) }...
It seems the intention of code like `guard !isLoading else { return }` but it also seems that there can be multiple instances and no tracking of a current loading...
Hello, First of all, thanks for the great code! I'm experiencing an issue when the app enters background, and then becomes active again. The image goes away, replaced by the...
``` import Foundation import Combine import Pyramid import UIKit class UserViewModel: ObservableObject { @Published var user: CurrentUser = CurrentUser.dInit @Published var uploading = false let provider = Pyramid() var cancellationToken:...
URLCache is both in-memory and on-disk cache, and it doesn't allocate a chunk of memory for it's data. You can define it's in-memory and on-disk size, which is more flexible....
Works in the example but not swifty and resuable...
Hello, Thanks for the example ! I was trying to use your code for an iOS 14 widget extension but the ImageLoader gets deallocated too soon, any ideas ? maybe...
Hi, Thanks for the code. Whilst Ive got this working ok on iOS, when I try and run my app as a Catalyst app the "Loading…." placeholder is never replaced....