SBSDKUIBarcodeScannerBehaviorConfiguration

@interface SBSDKUIBarcodeScannerBehaviorConfiguration : NSObject

Configuration for the behavior of barcodes.

  • Specifies the way of barcode images generation or disables this generation at all. Use, if you want to receive a full sized image with barcodes. Defaults to SBSDKBarcodeImageGenerationTypeNone.

    Declaration

    Objective-C

    @property (nonatomic) SBSDKBarcodeImageGenerationType barcodeImageGenerationType;

    Swift

    var barcodeImageGenerationType: SBSDKBarcodeImageGenerationType { get set }
  • Whether flash is toggled on or off.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isFlashEnabled) BOOL flashEnabled;

    Swift

    var isFlashEnabled: Bool { get set }
  • Whether scanner screen should make a sound on successful barcode detection.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isSuccessBeepEnabled) BOOL successBeepEnabled;

    Swift

    var isSuccessBeepEnabled: Bool { get set }
  • Time in seconds until the screen is automatically cancelled. Set to 0 to disable automatic cancellation. Defaults to 0 (disabled).

    Declaration

    Objective-C

    @property (nonatomic) NSTimeInterval autoCancelTimeout;

    Swift

    var autoCancelTimeout: TimeInterval { get set }
  • Additional parameters for tweaking the detection of barcodes.

    Declaration

    Objective-C

    @property (nonatomic, strong, nonnull) SBSDKBarcodeAdditionalParameters *additionalParameters;

    Swift

    var additionalParameters: SBSDKBarcodeAdditionalParameters { get set }
  • The range of valid camera zoom factors. Default value is (1.0; 3.0).

    Declaration

    Objective-C

    @property (nonatomic, strong, nonnull) SBSDKZoomRange *cameraZoomRange;

    Swift

    var cameraZoomRange: SBSDKZoomRange { get set }
  • The relative zoom level of the camera relative to zoomRange. The minimum value is 0.0 (zoomed out), the maximum value is 1.0 (zoomed in). The default value is 0.0, zoomed out.

    You can use this value to zoom the camera programmatically but also to set an initial zoom factor.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat cameraZoomFactor;

    Swift

    var cameraZoomFactor: CGFloat { get set }
  • When this property is set to YES, the zoom can be activated by double tapping somewhere in the receivers view. The default value is YES.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isDoubleTapToZoomEnabled) BOOL doubleTapToZoomEnabled;

    Swift

    var isDoubleTapToZoomEnabled: Bool { get set }
  • When this property is set to YES, the zoom can be activated by a pinch gesture somewhere in the receivers view. The default value is YES.

    Declaration

    Objective-C

    @property (nonatomic, assign, unsafe_unretained, readwrite,
              getter=isPinchToZoomEnabled) BOOL pinchToZoomEnabled;

    Swift

    var isPinchToZoomEnabled: Bool { get set }
  • Defines, if zooming in or out should be animated. The default value is YES;

    Declaration

    Objective-C

    @property (nonatomic) BOOL shouldAnimateZooming;

    Swift

    var shouldAnimateZooming: Bool { get set }