Type Method

layerWithSession:

Returns a preview layer initialized with a given capture session.

Declaration

+ (instancetype)layerWithSession:(AVCaptureSession *)session;

Parameters

session

The capture session from which to derive the preview.

Return Value

A preview layer initialized to use session.

See Also

Creating a Preview Layer

- initWithSession:

Initializes a preview layer with a given capture session.

- initWithSessionWithNoConnection:

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

+ layerWithSessionWithNoConnection:

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