Instance Property

liveView

A live view that displays the results of running the code that's on the current page.

Declaration

var liveView: PlaygroundLiveViewable? { get set }

Discussion

Display a live view by setting liveView to an object that conforms to the PlaygroundLiveViewable protocol. Dismiss any open live view by setting liveView to nil.

The live view is displayed in the assistant editor for the current playground page. There can be only one live view open at any time.

Displaying the live view requires that needsIndefiniteExecution be set to true. When liveView is set to a non-nil value, the system sets needsIndefiniteExecution to true.

See Also

Configuring Live Views

static let current: PlaygroundPage

The current playground page.