V8tr / AsyncImage

Asynchronous Image Loading from URL in SwiftUI
https://www.vadimbulavin.com/
The Unlicense
275 stars 36 forks source link

Missing curly brackets for placeholder in blog post #17

Open RoyalSWiSH opened 2 years ago

RoyalSWiSH commented 2 years ago

Hi,

in your blog post

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 should read placeholder: {Text("Loading ...")}.

It is correct in the repository. Thanks a lot for that easy introduction to combine and loading images! I am working on a science app and this helped a lot!

Best, Sebastian