Xcode 11 beta swift ui preview not showing
Just playing with Swift UI basic app and the preview canvas is not showing even though I'm in canvas mode. App runs, and I have this little snippet what am I missing?
#if DEBUG
struct ContentView_Previews : PreviewProvider {
static var previews: some View {
ContentView()
}
}
#endif
Solution 1:
Maybe someone is looking for this:
Editor -> Canvas (Alt + Command + Enter)
Solution 2:
To open the preview canvas, just go to Editor -> Canvas
Or do Alt + Command + Enter
If your macOS version is below 10.15, you will get the below error
Update mac and try the same.