CameraManager
class CameraManager : ObservableObject
The CameraManager class is a wrapper for the QRScannerController. It provides methods for setting up the QR scanner listener, starting the camera, stopping the camera, and adjusting the zoom level of the camera.
-
Declaration
Swift
let qrScannerController: QRScannerController
-
Sets up the QR scanner listener.
Declaration
Swift
func setUpQrScannerListener(listener: QrBytesListener)
Parameters
listener
The listener for receiving QR code bytes.
-
Starts the camera session.
Declaration
Swift
func startCamera()
-
Sets up whether the camera is in capture mode or not.
Declaration
Swift
func setUpCaptured(isCaptured: Bool)
Parameters
isCaptured
A boolean value indicating whether the camera is in capture mode.
-
Stops the camera from scanning for faces.
Declaration
Swift
func stopCamera()
-
Adjusts the zoom level of the camera.
Declaration
Swift
func adjustZoom(scale: CGFloat)
Parameters
scale
The scale factor for zooming.