Categories
ios swift swift-playground xcode

Xcode 8 playground live view doesn’t work

In my Swift playground, I entered the following code to test the live view feature:

let view = UIView()
PlaygroundPage.current.liveView = view

But for some reason the live view doesn’t display on the right in the Assistant Editor. Initially I thought that Xcode wasn’t finished running the playground. But I waited and waited and it still doesn’t show.

Screenshot:
enter image description here

Any help?