I have the simplest Playground to display image. I have images inside Resources. Somewhat it does not work and I am really confused. I am using macOS XCode.
I think on iPad Swift Playground this might work.
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
var body: some View {
Image("image1")
.resizable()
.frame(width: 512, height: 512)
}
}
let hostingController = UIHostingController(rootView: ContentView())
PlaygroundPage.current.liveView = hostingController