ALCameraConfig Class Reference

Inherits from NSObject
Conforms to ALJSONStringRepresentable
Declared in ALCameraConfig.h

Overview

An object that configures the scan view camera

  defaultCamera

Camera to be used for scanning. Could be “FRONT” or “BACK”

@property (nonatomic, readonly, nullable) NSString *defaultCamera

Declared In

ALCameraConfig.h

  captureResolution

Resolution in which the camera operates. Currently only 1080p is supported.

@property (nonatomic, readonly) ALCaptureViewResolution captureResolution

Declared In

ALCameraConfig.h

  pictureResolution

Picture resolution in which the camera operates. Currently only 1080p is supported.

@property (nonatomic, readonly) ALPictureResolution pictureResolution

Declared In

ALCameraConfig.h

  zoomFactor

Camera focal length (default: 1)

@property (nonatomic, readonly) CGFloat zoomFactor

Declared In

ALCameraConfig.h

  maxZoomFactor

Camera max focal length. Default: 0 => Device maxAvailableVideoZoom

@property (nonatomic, readonly) CGFloat maxZoomFactor

Declared In

ALCameraConfig.h

  zoomGesture

Determines whether the pinch-to-zoom gesture is enabled. Defaults to false

@property (nonatomic, readonly) BOOL zoomGesture

Declared In

ALCameraConfig.h

– initWithJSONDictionary:error:

Initializes an ALCameraConfig with an NSDictionary representing the JSON config object

- (instancetype _Nullable)initWithJSONDictionary:(NSDictionary *_Nonnull)JSONDictionary error:(NSError *_Nullable *_Nullable)error

Parameters

JSONDictionary

NSDictionary representing the JSON config object

error

NSError object which is filled with appropriate information when initialization fails

Return Value

an instance of ALCameraConfig

Declared In

ALCameraConfig.h

+ withJSONDictionary:

Creates an ALCameraConfig with an NSDictionary representing the JSON config object

+ (instancetype _Nullable)withJSONDictionary:(NSDictionary *_Nonnull)JSONDictionary

Parameters

JSONDictionary

NSDictionary representing the JSON config object

Return Value

an instance of ALCameraConfig

Declared In

ALCameraConfig.h

+ defaultCameraConfig

Creates an ALCameraConfig with default values, suitable for further custimization

+ (instancetype)defaultCameraConfig

Return Value

an instance of ALCameraConfig

Declared In

ALCameraConfig.h

– initWithDefaultCamera:captureViewResolution:pictureResolution:zoomFactor:maxZoomFactor:zoomGesture:

Initializes an ALCameraConfig object.

- (instancetype)initWithDefaultCamera:(NSString *)defaultCamera captureViewResolution:(ALCaptureViewResolution)captureResolution pictureResolution:(ALPictureResolution)pictureResolution zoomFactor:(CGFloat)zoomFactor maxZoomFactor:(CGFloat)maxZoomFactor zoomGesture:(BOOL)zoomGesture

Parameters

defaultCamera

Camera to be used for scanning. Could be “FRONT” or “BACK”

captureResolution

Resolution in which the camera operates. Currently only 1080p is supported.

pictureResolution

Picture resolution in which the camera operates. Currently only 1080p is supported.

zoomFactor

Camera focal length (default: 1)

maxZoomFactor

Camera max focal length. Default: 0 => Device maxAvailableVideoZoom

zoomGesture

Determines whether the pinch-to-zoom gesture is enabled. Defaults to false

Declared In

ALCameraConfig.h

+ withDefaultCamera:captureViewResolution:pictureResolution:zoomFactor:maxZoomFactor:zoomGesture:

Creates an ALCameraConfig object.

+ (ALCameraConfig *)withDefaultCamera:(NSString *)defaultCamera captureViewResolution:(ALCaptureViewResolution)captureResolution pictureResolution:(ALPictureResolution)pictureResolution zoomFactor:(CGFloat)zoomFactor maxZoomFactor:(CGFloat)maxZoomFactor zoomGesture:(BOOL)zoomGesture

Parameters

defaultCamera

Camera to be used for scanning. Could be “FRONT” or “BACK”

captureResolution

Resolution in which the camera operates. Currently only 1080p is supported.

pictureResolution

Picture resolution in which the camera operates. Currently only 1080p is supported.

zoomFactor

Camera focal length (default: 1)

maxZoomFactor

Camera max focal length. Default: 0 => Device maxAvailableVideoZoom

zoomGesture

Determines whether the pinch-to-zoom gesture is enabled. Defaults to false

Declared In

ALCameraConfig.h