---
title: liveView
framework: playgroundsupport
role: symbol
role_heading: Instance Property
path: playgroundsupport/playgroundpage/1964506-liveview
---

# liveView

A live view that shows the result of running the code that’s on the current page.

## Declaration

```swift
final var liveView: (any PlaygroundLiveViewable)? { get set }
```

```swift
var liveView: PlaygroundLiveViewable? { get set }
```

## Discussion

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

- [current](playgroundsupport/playgroundpage/1964509-current.md)
- [setLiveView(_:)](playgroundsupport/playgroundpage/3375751-setliveview.md)
- [setLiveView(_:)](playgroundsupport/playgroundpage/3375752-setliveview.md)
