Initializer

init(sessionWithNoConnection:)

Initializes a preview layer using a given capture session but without making any connections.

Declaration

init(sessionWithNoConnection session: AVCaptureSession)

Parameters

session

The capture session to be previewed.

Return Value

A preview layer initialized with session but with no connections to any of the session’s eligible video inputs

Discussion

Only use this initializer if you intend to manually form a connection between a desired AVCaptureInput.Port object and a AVCaptureOutput using addConnection(_:).

See Also

Creating a Preview Layer

init(session: AVCaptureSession)

Initializes a preview layer with a given capture session.