ALScanView Class Reference

Inherits from UIView
Declared in ALScanView.h

Overview

The visible component that manages the acquisition of image frames from the device, as well as user input, and passes them to the scan plugin for processing

– initWithFrame:scanViewPlugin:scanViewConfig:error:

Initializes an ALScanView object with a scan view plugin, and a scan view config object

- (_Nullable instancetype)initWithFrame:(CGRect)frame scanViewPlugin:(NSObject<ALScanViewPluginBase> *)scanViewPlugin scanViewConfig:(ALScanViewConfig *_Nullable)scanViewConfig error:(NSError *_Nullable *_Nullable)error

Parameters

frame

the frame of the scan view within the view hierarchy

scanViewPlugin

an ALScanViewPlugin object

scanViewConfig

an optional ALScanViewConfig object. Defaults will be assumed if null

error

if error is encountered while initializing the ScanView object, this will be populated with the reasons for the failure

Return Value

the ALScanView object

Declared In

ALScanView.h

– initWithFrame:scanViewPlugin:error:

Initializes an ALScanView object with a scan view plugin

- (_Nullable instancetype)initWithFrame:(CGRect)frame scanViewPlugin:(NSObject<ALScanViewPluginBase> *)scanViewPlugin error:(NSError *_Nullable *_Nullable)error

Parameters

frame

the frame of the scan view within the view hierarchy

scanViewPlugin

an ALScanViewPlugin object

error

if error is encountered while initializing the ScanView object, this will be populated with the reasons for the failure

Return Value

the ALScanView object

Declared In

ALScanView.h

– setScanViewPlugin:error:

Update a scan view with a different scan view plugin. The cutout and feedback layers will also be updated.

- (BOOL)setScanViewPlugin:(NSObject<ALScanViewPluginBase> *)scanViewPlugin error:(NSError *_Nullable *_Nullable)error

Parameters

scanViewPlugin

a different scan view plugin

error

if error is encountered while setting the ScanViewPlugin object, this will be populated with the reason for the failure

Return Value

a boolean indicating whether or not the operation succeeded.

Declared In

ALScanView.h

  delegate

The object to be notified of events reported by the scan view

@property (nonatomic, weak) id<ALScanViewDelegate> delegate

Declared In

ALScanView.h

  scanViewPlugin

The scan view plugin instance

@property (nonatomic, readonly) NSObject<ALScanViewPluginBase> *scanViewPlugin

Declared In

ALScanView.h

  flashButtonFrame

The frame of the visible flash toggle button. The frame can be useful for some operations done on the UI layer

@property (nonatomic, readonly) CGRect flashButtonFrame

Declared In

ALScanView.h

  scanViewConfig

The scan view config passed to this object during initialization

@property (nonatomic, readonly) ALScanViewConfig *scanViewConfig

Declared In

ALScanView.h

  supportedNativeBarcodeFormats

Enable native barcode scanning by providing a list of valid barcode formats to use. You may also set an empty array to scan all possible types (may impact performance), or null to disable. In either case, do so before calling startCamera. This is by default null.

@property (nonatomic, strong, nullable) NSArray<AVMetadataObjectType> *supportedNativeBarcodeFormats

Declared In

ALScanView.h

– startCamera

Starts the scan view camera

- (void)startCamera

Declared In

ALScanView.h

– stopCamera

Stops the scan view camera

- (void)stopCamera

Declared In

ALScanView.h