Contents

setLiveView(_:)

Displays a SwiftUI view that shows the result of running the code that’s on the current page.

Declaration

final func setLiveView<IncomingView>(_ newLiveView: IncomingView) where IncomingView : View
func setLiveView<IncomingView>(_ newLiveView: IncomingView) where IncomingView : View

Parameters

  • newLiveView:

    The view to display as the current page’s live view.

Discussion

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

When you call setLiveView(_:), the system sets needsIndefiniteExecution to true.

See Also

Configuring Live Views