Table of contents
Swift
Objective-C

BarcodeScannerConfig

BarcodeScannerConfig is the class that defines the configurations for barcode scanning. Once the BarcodeScannerConfig object is made, it must be attached to the BarcodeScannerViewController object.

Definition

Assembly: DynamsoftBarcodeReaderBundle.xcframework

  • Objective-C
  • Swift
  1. @interface DSBarcodeScannerConfig : NSObject
    
  2. class BarcodeScannerConfig : NSObject
    

Properties

Property Type Description
license NSString * Sets or returns the license key for the Barcode Reader.
templateFile NSString * Sets or returns the template with a file path or a JSON string.
barcodeFormats DSBarcodeFormat Sets or returns the barcode format(s) to read.
scanRegion DSRect * Sets or returns the scan region where only the barcodes located in the scan region can be decoded.
isTorchButtonVisible BOOL Sets or returns whether or not the torch button is visible.
isBeepEnabled BOOL Sets or returns whether the beep sound is enabled when a barcode is found.
isScanLaserVisible BOOL Sets or returns whether or not the scan laser is visible.
isAutoZoomEnabled BOOL Sets or returns whether or not the auto-zoom feature of the Camera Enhancer is enabled.
isCloseButtonVisible BOOL Sets or returns whether or not the close button is visible.
scanningMode DSScanningMode Sets or returns the scanning mode.
maxConsecutiveStableFramesToExit int Sets or returns how long the library will keep scanning when there is no more barcodes to decode.
expectedBarcodesCount NSIntger Sets or returns the expected number of barcodes.
isCameraToggleButtonVisible BOOL Sets or returns whether or not the camera toggle button is visible.

The following property is deprecated:

Property Type Description
templateFilePath NSString * Sets or returns the local JSON file path that will configure the parameters template for the Barcode Reader.

license

Sets or returns the license key for the Barcode Reader.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) NSString* license;
    
  2. var license: String { get set }
    

templateFile

Sets or returns the template with a file path or a JSON string.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) NSString* templateFile;
    
  2. var templateFile: String { get set }
    

barcodeFormats

Sets or returns the barcode format(s) to read.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) DSBarcodeFormat barcodeFormats;
    
  2. var barcodeFormats: BarcodeFormat { get set }
    

See also

scanRegion

Sets or returns the scan region where only the barcodes located in the scan region can be decoded.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) DSRect* scanRegion;
    
  2. var scanRegion: DSRect { get set }
    

See also

isTorchButtonVisible

Sets or returns a boolean indicating whether or not the torch button is visible. User can click the torch button to turn on/off the torch.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) BOOL isTorchButtonVisible;
    
  2. var isTorchButtonVisible: Bool { get set }
    

isBeepEnabled

Sets or returns a boolean indicating whether or not the beep sound is enabled.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) BOOL isBeepEnabled;
    
  2. var isBeepEnabled: Bool { get set }
    

isScanLaserVisible

Sets or returns a boolean indicating whether or not the scan laser is visible.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) BOOL isScanLaserVisible;
    
  2. var isScanLaserVisible: Bool { get set }
    

isAutoZoomEnabled

Sets or returns a boolean indicating whether or not the auto-zoom feature of the Camera Enhancer is enabled.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) BOOL isAutoZoomEnabled;
    
  2. var isAutoZoomEnabled: Bool { get set }
    

isCloseButtonVisible

Sets or returns a boolean indicating whether or not the close button is visible.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) BOOL isCloseButtonVisible;
    
  2. var isCloseButtonVisible: Bool { get set }
    

scanningMode

Sets or returns the barcode scanning mode.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) ScanningMode scanningMode;
    
  2. var scanningMode: ScanningMode { get set }
    

maxConsecutiveStableFramesToExit

Sets or returns how long the library will keep scanning when there is no more barcodes to decode. The Default value is 10, which means the library will keep scanning for 10 consecutive stable frames.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) int maxConsecutiveStableFramesToExit;
    
  2. var maxConsecutiveStableFramesToExit: Int { get set }
    

expectedBarcodesCount

Sets or returns the expected number of barcodes.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) int expectedBarcodesCount;
    
  2. var expectedBarcodesCount: Int { get set }
    

isCameraToggleButtonVisible

Sets or returns a boolean indicating whether the camera toggle button is visible.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) BOOL isCameraToggleButtonVisible;
    
  2. var isCameraToggleButtonVisible: Bool { get set }
    

templateFilePath

Note: Property templateFilePath is deprecated. Please use templateFile instead.

Sets or returns the local JSON file path that will configure the parameters template for the Barcode Reader.

  • Objective-C
  • Swift
  1. @property(nonatomic, assign) NSString* templateFilePath;
    
  2. var templateFilePath: String { get set }
    

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: