react-native-camera-kit/ios/ReactNativeCameraKit/CameraProtocol.swift
Seph Soliman f58bc77ef1 Added zoom control
Added max zoom control
Added onZoom handler
2023-07-12 18:12:33 -07:00

34 lines
1.1 KiB
Swift

//
// CameraProtocol.swift
// ReactNativeCameraKit
//
import AVFoundation
protocol CameraProtocol: AnyObject, FocusInterfaceViewDelegate {
var previewView: UIView { get }
func setup(cameraType: CameraType, supportedBarcodeType: [AVMetadataObject.ObjectType])
func cameraRemovedFromSuperview()
func update(torchMode: TorchMode)
func update(flashMode: FlashMode)
func update(cameraType: CameraType)
func update(onOrientationChange: RCTDirectEventBlock?)
func update(onZoom: RCTDirectEventBlock?)
func update(zoom: Double?)
func update(maxZoom: Double?)
func zoomPinchStart()
func zoomPinchChange(pinchScale: CGFloat)
func isBarcodeScannerEnabled(_ isEnabled: Bool,
supportedBarcodeType: [AVMetadataObject.ObjectType],
onBarcodeRead: ((_ barcode: String) -> Void)?)
func update(scannerFrameSize: CGRect?)
func capturePicture(onWillCapture: @escaping () -> Void,
onSuccess: @escaping (_ imageData: Data, _ thumbnailData: Data?) -> (),
onError: @escaping (_ message: String) -> ())
}