Instance Property


A Boolean value that indicates whether the layer is rendering video frames from its source.


var isPreviewing: Bool { get }


A preview layer begins previewing when you call the capture session’s startRunning() method. When associated with an AVCaptureMultiCamSession, all video preview layers are guaranteed to be previewing by the time the blocking call to startRunning() or commitConfiguration() returns.

While a session is running, you may enable or disable a video preview layer’s connection to start or stop the flow of video to the layer. You may key-value observe the connection’s isEnabled property to observe this property changing, and synchronize any user interface changes to take place precisely when the video resumes rendering to the video preview layer.

See Also

Layer Configuration

var videoGravity: AVLayerVideoGravity

Indicates how the layer displays the video content within its bounds.