Instance Method

initWithSession:

Initializes a preview layer with a given capture session.

Declaration

- (instancetype)initWithSession:(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

+ layerWithSession:

Returns a preview layer initialized 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.