XCODE 11: Doesnot Show

Asked By 10 points N/A Posted on -
qa-featured

I’m trying to run the new Canvas Xcode 11 feature, but the canvas is not showing. What am I doing wrong?I just created a new standard project (single-view application), compiled it and activated ‘Editor> Editor and Canvas’. I can browse all the files in the project, nothing is displayed. What else do you have to do?

SHARE
Answered By 0 points N/A #318472

XCODE 11: Doesnot Show

qa-featured

You can still see the live view using playgrounds. with UIHostingController.

Import UIKit

SwiftUI Import

Import PlaygroundSupport

struct ContentView: See {

var body: a view {Text (“Hello world”)

.color (Color.blue)}}

PlaygroundPage.current.liveView = UIHostingController.init (rootView: ContentView ())

Related Questions