SparkScan View

Defined in framework ScanditBarcodeCapture

SDCSparkScanScanningBehavior

Added in version 6.15.0

The capture mode type of the SDCSparkScanView.

SDCSparkScanScanningBehaviorSingle

Added in version 6.15.0

Barcode capturing session is stopped after each scan.

SDCSparkScanScanningBehaviorContinuous

Added in version 6.15.0

Keeps the barcode capturing session active for longer time.

SDCSparkScanPreviewBehavior

Added in version 6.23.0

The preview behavior type of the SDCSparkScanView.

SDCSparkScanPreviewBehaviorDefault

Added in version 6.23.0

After a scan with scanning behavior SDCSparkScanScanningBehaviorSingle, or stopping scanning with scanning behavior SDCSparkScanScanningBehaviorContinuous, camera moves to standby state and preview is hidden for maximum efficiency.

SDCSparkScanPreviewBehaviorPersistent

Added in version 6.23.0

After a scan with scanning behavior SDCSparkScanScanningBehaviorSingle, or stopping scanning with scanning behavior SDCSparkScanScanningBehaviorContinuous, camera stays active and preview is visible for maximum precision.

SDCSparkScanViewHandMode

Added in version 6.15.0

The hand mode type of the SDCSparkScanView.

SDCSparkScanViewHandModeRight

Added in version 6.15.0

Optimizes the layout for right-hand use of the SDCSparkScanView.

SDCSparkScanViewHandModeLeft

Added in version 6.15.0

Optimizes the layout for left-hand use of the SDCSparkScanView.

SDCSparkScanScanningPrecision

Added in version 6.19.0

The scanning precision type of the SDCSparkScanView.

SDCSparkScanScanningPrecisionDefault

Added in version 6.19.0

Default precision. Depending on the configured scanning mode and behavior, it results in the following behaviors:

SDCSparkScanScanningModeDefault

SDCSparkScanScanningModeTarget

SDCSparkScanScanningBehaviorSingle

  • Tapping the trigger button starts the camera and the scanning process.

  • A barcode is scanned as soon as it is visible on the camera frame.

  • After a successful scan, the scanning process is stopped, and the camera is frozen on the last frame.

  • Tapping the trigger button starts the camera and the scanning process.

  • A barcode is scanned after pointing the viewfinder at it for a short time.

  • After a successful scan, the scanning process is stopped, and the camera is frozen on the last frame.

SDCSparkScanScanningBehaviorContinuous

  • Tapping the trigger button starts the camera and the scanning process.

  • A barcode is scanned as soon as it is visible on the camera frame.

  • Camera and scanning process keep running until the user taps the trigger button, or the SDCSparkScanViewSettings.continuousCaptureTimeout expires.

  • Tapping the trigger button starts the camera and the scanning process.

  • A barcode is scanned after pointing the viewfinder at it for a short time.

  • Camera and scanning process keep running until the user taps the trigger button, or the SDCSparkScanViewSettings.continuousCaptureTimeout expires.

SDCSparkScanScanningPrecisionAccurate

Added in version 6.19.0

Accurate precision. Depending on the configured scanning mode and behavior, it results in the following behaviors:

SDCSparkScanScanningModeDefault

SDCSparkScanScanningModeTarget

SDCSparkScanScanningBehaviorSingle

  • Expanding the trigger button starts the camera, and tapping it starts the scanning process.

  • A barcode is scanned after pointing the viewfinder at it.

  • After a successful scan, the scanning process is stopped, but the camera keeps running.

  • Tapping the trigger button starts the camera and the scanning process.

  • A barcode is scanned after pointing the viewfinder at it and tapping the trigger button.

  • Camera and scanning process keep running until the trigger button is collapsed.

SDCSparkScanScanningBehaviorContinuous

  • Expanding the trigger button starts the camera, and tapping it starts the scanning process.

  • A barcode is scanned after pointing the viewfinder at it.

  • Camera and scanning process keep running until the user taps the trigger button, or the SDCSparkScanViewSettings.continuousCaptureTimeout expires.

  • Expanding the trigger button starts the camera, and tapping it starts the scanning process.

  • A barcode is scanned after pointing the viewfinder at it for a short time.

  • Camera and scanning process keep running until the user taps the trigger button, or the SDCSparkScanViewSettings.continuousCaptureTimeout expires.

Deprecated since version 6.23.0: Replaced by SDCSparkScanPreviewBehavior because accurate workflow have been simplified.

SDCSparkScanViewUIDelegate
@protocol SDCSparkScanViewUIDelegate <NSObject>

Added in version 6.16.0

- fastFindButtonTappedInView:
- (void)fastFindButtonTappedInView:(nonnull SDCSparkScanView *)view

Added in version 6.16.0

Callback method that can be used to define an action that should be performed when barcode find button is tapped from the toolbar. Called from the main thread.

Deprecated since version 6.26: This method was renamed. Use barcodeFindButtonTappedInView: instead.

- barcodeFindButtonTappedInView:
- (void)barcodeFindButtonTappedInView:(nonnull SDCSparkScanView *)view

Added in version 6.26.0

Callback method that can be used to define an action that should be performed when barcode find button is tapped from the toolbar. Called from the main thread.

- barcodeCountButtonTappedInView:
- (void)barcodeCountButtonTappedInView:(nonnull SDCSparkScanView *)view

Added in version 6.16.0

Callback method that can be used to define an action that should be performed when barcode count button is tapped from the toolbar. Called from the main thread.

- sparkScanView:didChangeScanningMode:
- (void)sparkScanView:(nonnull SDCSparkScanView *)view
didChangeScanningMode:(nonnull id<SDCSparkScanScanningMode>)scanningMode

Added in version 6.20.0

Callback method that will be called when the currently used SparkScanScanningMode changes. Called from the main thread.

SDCSparkScanScanningMode
@protocol SDCSparkScanScanningMode <NSObject>

Added in version 6.16.0

The base class for setting a default scanning mode to SDCSparkScanViewSettings. Can be either SDCSparkScanScanningModeTarget or SDCSparkScanScanningModeDefault.

JSONString
@property (nonatomic, nonnull, readonly) NSString *JSONString

Added in version 6.16.0

Returns the JSON representation.

SDCSparkScanScanningModeTarget
@interface SDCSparkScanScanningModeTarget : NSObject <SDCSparkScanScanningMode>

Added in version 6.16.0

Target scanning mode. This is meant and optimized to scan codes further away.

- initWithScanningBehavior:scanningPrecision:
- (instancetype)initWithScanningBehavior:(SDCSparkScanScanningBehavior)scanningBehavior
                       scanningPrecision:(SDCSparkScanScanningPrecision)scanningPrecision

Added in version 6.16.0

Constructs a new target scanning mode with the provided capture mode and scanning precision.

Deprecated since version 6.23.0: Replaced by initializer that accepts SDCSparkScanPreviewBehavior instead of deprecated SDCSparkScanScanningPrecision.

- initWithScanningBehavior:previewBehavior:
- (instancetype)initWithScanningBehavior:(SDCSparkScanScanningBehavior)scanningBehavior
                         previewBehavior:(SDCSparkScanPreviewBehavior)previewBehavior

Added in version 6.23.0

Constructs a new target scanning mode with the provided capture mode and preview behavior.

scanningBehavior
@property (nonatomic, assign, readonly) SDCSparkScanScanningBehavior scanningBehavior

Added in version 6.16.0

The scanning mode provided in the constructor.

previewBehavior
@property (nonatomic, assign, readonly) SDCSparkScanPreviewBehavior previewBehavior

Added in version 6.23.0

The preview behavior provided in the constructor.

scanningPrecision
@property (nonatomic, assign, readonly) SDCSparkScanScanningPrecision scanningPrecision

Added in version 6.19.0

The scanning precision provided in the constructor.

Deprecated since version 6.23.0: Replaced by previewBehavior.

JSONString
@property (nonatomic, nonnull, readonly) NSString *JSONString

Added in version 6.16.0

Returns the JSON representation.

SDCSparkScanScanningModeDefault
@interface SDCSparkScanScanningModeDefault : NSObject <SDCSparkScanScanningMode>

Added in version 6.16.0

This is the standard scanning mode for SparkScan.

- initWithScanningBehavior:scanningPrecision:
- (instancetype)initWithScanningBehavior:(SDCSparkScanScanningBehavior)scanningBehavior
                       scanningPrecision:(SDCSparkScanScanningPrecision)scanningPrecision

Added in version 6.16.0

Constructs a new default scanning mode with the provided capture mode and scanning precision.

Deprecated since version 6.23.0: Replaced by initializer that accepts SDCSparkScanPreviewBehavior instead of deprecated SDCSparkScanScanningPrecision.

- initWithScanningBehavior:previewBehavior:
- (instancetype)initWithScanningBehavior:(SDCSparkScanScanningBehavior)scanningBehavior
                         previewBehavior:(SDCSparkScanPreviewBehavior)previewBehavior

Added in version 6.23.0

Constructs a new default scanning mode with the provided capture mode and preview behavior.

scanningBehavior
@property (nonatomic, assign, readonly) SDCSparkScanScanningBehavior scanningBehavior

Added in version 6.16.0

The scanning mode provided in the constructor.

previewBehavior
@property (nonatomic, assign, readonly) SDCSparkScanPreviewBehavior previewBehavior

Added in version 6.23.0

The preview behavior provided in the constructor.

scanningPrecision
@property (nonatomic, assign, readonly) SDCSparkScanScanningPrecision scanningPrecision

Added in version 6.19.0

The scanning precision provided in the constructor.

Deprecated since version 6.23.0: Replaced by previewBehavior.

JSONString
@property (nonatomic, nonnull, readonly) NSString *JSONString

Added in version 6.16.0

Returns the JSON representation.

SDCSparkScanView
@interface SDCSparkScanView : UIView

Added in version 6.15.0

SDCSparkScan comes with a ready-to-use UI and scanning modes that are purpose-built to tackle high-volume scanning at close range. The SparkScanView integrates with any app without requiring app redesign or customization. It includes:

  • camera preview screen

  • large-sized scan button

  • quick access toolbar to adjust scanning settings

- emitFeedback:
- (void)emitFeedback:(nonnull SDCSparkScanViewFeedback *)feedback

Added in version 6.16.0

Deprecated since version 6.23: Use feedbackDelegate instead.

Displays the SDCSparkScanViewFeedback feedback and emits a SDCSparkScanFeedback based on the feedback type.

feedbackDelegate
@property (nonatomic, weak, nullable) id<SDCSparkScanFeedbackDelegate> feedbackDelegate

Added in version 6.23.0

Sets the feedback delegate. If no delegate is set, the default SparkScanBarcodeFeedback.Success feedback is emitted.

- initWithParentView:context:sparkScan:settings:
- (instancetype)initWithParentView:(nonnull UIView *)parentView
                           context:(nonnull SDCDataCaptureContext *)context
                         sparkScan:(nonnull SDCSparkScan *)sparkScan
                          settings:(nonnull SDCSparkScanViewSettings *)settings

Added in version 6.15.0

Constructs a new SparkScan view and adds it to the provided parentView. When the settings are provided, those will be used to set the default behaviour and look of the view.

sparkScanView = SparkScanView(parentView: view, // For example the view controller's view property.
                              context: context,
                              sparkScan: sparkScan,
                              settings: viewSettings)
- viewWillAppear
- (void)viewWillAppear

Added in version 6.16.0

Method to call for preparing the mode for scanning. For instance, it can be called when the view controller containing SparkScanView is presented (i.e., UIViewController’s viewWillAppear). Please note that this method is equivalent to prepareScanning.

override func viewWillAppear(animated: Bool) {
    super.viewWillAppear(animated)
    sparkScanView.viewWillAppear()
}

Deprecated since version 6.26: Use prepareScanning instead.

- viewWillDisappear
- (void)viewWillDisappear

Added in version 6.16.0

Method to call for stopping the mode. For instance, it can be called when the view controller containing SparkScanView is about to disappear (i.e., UIViewController’s viewWillDisappear). Please note that this method is equivalent to stopScanning.

override func viewWillDisappear(animated: Bool) {
    super.viewWillDisappear(animated)
    sparkScanView.viewWillDisappear()
}

Deprecated since version 6.26: Use stopScanning instead.

- prepareScanning
- (void)prepareScanning

Added in version 6.16.0

Method to call for preparing the mode for scanning. For instance, it can be called when the view controller containing SparkScanView is presented (i.e., UIViewController’s viewWillAppear).

Important

This method must be called before using the SparkScanView for scanning.

- stopScanning
- (void)stopScanning

Added in version 6.16.0

Method to call for stopping the mode. For instance, it can be called when the view controller containing SparkScanView is about to disappear (i.e., UIViewController’s viewWillDisappear).

Important

This method must be called to ensure that all resources used by SparkScanView are released. If your workflow involves using other Scandit modes, call this method before switching to another mode.

- startScanning
- (void)startScanning

Added in version 6.15.0

Starts the scanning process. You can call this method if you want to trigger the scanning process without any user interaction.

- pauseScanning
- (void)pauseScanning

Added in version 6.15.0

Pauses the scanning process. You can call this method if you want to trigger pausing the scanning process without any user interaction.

- showToast:
- (void)showToast:(NSString *)text

Added in version 6.18.0

Shows a toast with text inside the mini preview.

scanningMode
@property (nonatomic, strong, readonly) id<SDCSparkScanScanningMode> scanningMode

Added in version 6.20.0

Returns the currently used SparkScanScanningMode.

shouldShowScanAreaGuides
@property (nonatomic, assign) BOOL shouldShowScanAreaGuides

Added in version 6.16.0

Whether to show scan area guides on top of the preview. This property is useful during development to visualize the current scan areas on screen. It is not meant to be used for production. By default this property is NO.

Deprecated since version 6.26: This property is deprecated as it’s no longer needed.

brush
@property (nonatomic, strong, nonnull) SDCBrush *brush

Added in version 6.16.0

Deprecated since version 6.23: The brush is now specified for each detected barcode. See SDCSparkScanBarcodeFeedback and feedbackDelegate.

The brush used for visualizing captured barcodes in the UI. To turn off drawing of locations, set the brush to use both a transparent fill and stroke color. By default, the brush has a transparent fill color, a white stroke color, and a stroke width of 1.

defaultBrush
@property (class, nonatomic, strong, nonnull, readonly) SDCBrush *defaultBrush

Added in version 6.16.0

Returns the default brush used by the overlay.

UIDelegate
@property (nonatomic, weak, nullable) id<SDCSparkScanViewUIDelegate> UIDelegate

Added in version 6.16.0

Sets the delegate which is called whenever a barcode find button or barcode count button is tapped from the toolbar.

barcodeCountButtonVisible
@property (nonatomic, assign, getter=isBarcodeCountButtonVisible) BOOL barcodeCountButtonVisible

Added in version 6.16.0

Indicates whether the barcode count button should be shown to the user.

Default is NO.

barcodeFindButtonVisible
@property (nonatomic, assign, getter=isBarcodeFindButtonVisible) BOOL barcodeFindButtonVisible

Added in version 6.26.0

Indicates whether the barcode find button should be shown to the user.

Default is NO.

fastFindButtonVisible
@property (nonatomic, assign, getter=isFastFindButtonVisible) BOOL fastFindButtonVisible

Added in version 6.16.0

Indicates whether the barcode find button should be shown to the user.

Default is NO.

Deprecated since version 6.26: This property was renamed. Use barcodeFindButtonVisible instead.

targetModeButtonVisible
@property (nonatomic, assign, getter=isTargetModeButtonVisible) BOOL targetModeButtonVisible

Added in version 6.16.0

Indicates whether the target mode button should be shown to the user.

Default is YES.

scanningBehaviorButtonVisible
@property (nonatomic, assign, getter=isScanningBehaviorButtonVisible) BOOL scanningBehaviorButtonVisible

Added in version 6.15.0

Indicates whether the scanning behavior button should be shown to the user.

Default is NO.

torchButtonVisible
@property (nonatomic, assign, getter=isTorchButtonVisible) BOOL torchButtonVisible

Added in version 6.15.0

Indicates whether the torch button should be shown to the user.

Default is YES.

soundModeButtonVisible
@property (nonatomic, assign, getter=isSoundModeButtonVisible) BOOL soundModeButtonVisible

Added in version 6.16.0

Indicates whether the enable sound button should be shown to the user.

Default is NO.

Deprecated since version 6.26: This property is deprecated as sound mode button will be removed in the future.

hapticModeButtonVisible
@property (nonatomic, assign, getter=isHapticModeButtonVisible) BOOL hapticModeButtonVisible

Added in version 6.16.0

Indicates whether the enable haptic button should be shown to the user.

Default is NO.

Deprecated since version 6.26: This property is deprecated as haptic mode button will be removed in the future.

handModeButtonVisible
@property (nonatomic, assign, getter=isHandModeButtonVisible) BOOL handModeButtonVisible

Added in version 6.15.0

Indicates whether the hand mode button should be shown to the user.

Default is NO.

zoomSwitchControlVisible
@property (nonatomic, assign, getter=isZoomSwitchControlVisible) BOOL zoomSwitchControlVisible

Added in version 6.18.0

Indicates whether the zoom switch control should be shown to the user.

Default is YES.

previewSizeControlVisible
@property (nonatomic, assign, getter=isPreviewSizeControlVisible) BOOL previewSizeControlVisible

Added in version 6.23.0

Indicates whether the mini preview size control should be shown to the user.

Default is YES.

cameraSwitchButtonVisible
@property (nonatomic, assign, getter=isCameraSwitchButtonVisible) BOOL cameraSwitchButtonVisible

Added in version 6.24.0

Indicates whether the camera switch button should be shown to the user.

Default is NO.

Note

This API is still in beta and may change in future versions of Scandit Data Capture SDK.

stopCapturingText
@property (nonatomic, strong, nullable) NSString *stopCapturingText

Added in version 6.15.0

Sets the default text to display in the button for the stop capturing action.

When scanning using hold-to-scan interaction default is “RELEASE TO STOP SCANNING” otherwise default is “STOP SCANNING”

startCapturingText
@property (nonatomic, strong, nullable) NSString *startCapturingText

Added in version 6.15.0

Sets the default text to display in the button for the start capturing action.

When SDCSparkScanViewSettings.holdToScanEnabled is enabled then default is “TAP OR HOLD TO SCAN” otherwise default is “TAP TO SCAN”

resumeCapturingText
@property (nonatomic, strong, nullable) NSString *resumeCapturingText

Added in version 6.15.0

Sets the default text to display in the button for the resume capturing action.

Default is “RESUME SCANNING”

scanningCapturingText
@property (nonatomic, strong, nullable) NSString *scanningCapturingText

Added in version 6.16.0

Sets the default text to display in the button when scanning in SDCSparkScanScanningBehaviorSingle.

Default is nil.

captureButtonBackgroundColor
@property (nonatomic, strong, nullable) UIColor *captureButtonBackgroundColor

Added in version 6.15.0

Sets the background color of the capture button.

Default is #12161999.

captureButtonActiveBackgroundColor
@property (nonatomic, strong, nullable) UIColor *captureButtonActiveBackgroundColor

Added in version 6.16.0

Sets the background color of the capture button when scanning.

Default is #12161966.

captureButtonTintColor
@property (nonatomic, strong, nullable) UIColor *captureButtonTintColor

Added in version 6.16.0

Sets the capture button icon and text color.

Default is #FFFFFF.

toolbarBackgroundColor
@property (nonatomic, strong, nullable) UIColor *toolbarBackgroundColor

Added in version 6.16.0

Sets the toolbar background color.

Default is #121619CC.

toolbarIconActiveTintColor
@property (nonatomic, strong, nullable) UIColor *toolbarIconActiveTintColor

Added in version 6.16.0

Sets the toolbar icon active color.

Default is #FBC02C.

toolbarIconInactiveTintColor
@property (nonatomic, strong, nullable) UIColor *toolbarIconInactiveTintColor

Added in version 6.16.0

Sets the toolbar icon inactive color.

Default is #FFFFFF.

targetModeHintText
@property (nonatomic, strong, nullable) NSString *targetModeHintText

Added in version 6.18.0

Sets the target mode hint text.

Default is nil.

Deprecated since version 6.23: This property is not used as target mode hint is not shown anymore see shouldShowTargetModeHint.

shouldShowTargetModeHint
@property (nonatomic, assign) BOOL shouldShowTargetModeHint

Added in version 6.18.0

Indicates whether hints in target mode should be shown to the user.

Default is YES.

Deprecated since version 6.23: This hint is not displayed anymore due to changes in SDCSparkScanScanningModeTarget scanning mode.

NSStringFromSparkScanScanningBehavior(scanningBehavior)
NSString *_Nonnull NSStringFromSparkScanScanningBehavior(SDCSparkScanScanningBehavior scanningBehavior)

Added in version 6.15.0

Deprecated since version 6.26.0: This function will be removed in the future.

SDCSparkScanScanningBehaviorFromJSONString(JSONString, scanningBehavior)
BOOL SDCSparkScanScanningBehaviorFromJSONString(NSString *_Nonnull JSONString, SDCSparkScanScanningBehavior *_Nonnull scanningBehavior)

Added in version 6.15.0

Deprecated since version 6.26.0: This function will be removed in the future.

NSStringFromSparkScanPreviewBehavior(previewBehavior)
NSString *_Nonnull NSStringFromSparkScanPreviewBehavior(SDCSparkScanPreviewBehavior previewBehavior)

Added in version 6.23.0

Deprecated since version 6.26.0: This function will be removed in the future.

SDCSparkScanPreviewBehaviorFromJSONString(JSONString, previewBehavior)
BOOL SDCSparkScanPreviewBehaviorFromJSONString(NSString *_Nonnull JSONString, SDCSparkScanPreviewBehavior *_Nonnull previewBehavior)

Added in version 6.23.0

Deprecated since version 6.26.0: This function will be removed in the future.

NSStringFromSparkScanScanningPrecision(scanningPrecision)
NSString *_Nonnull NSStringFromSparkScanScanningPrecision(SDCSparkScanScanningPrecision scanningPrecision)

Added in version 6.19.0

Deprecated since version 6.23.0: Replaced by NSStringFromSparkScanPreviewBehavior(previewBehavior).

SDCSparkScanScanningPrecisionFromJSONString(JSONString, scanningPrecision)
BOOL SDCSparkScanScanningPrecisionFromJSONString(NSString *_Nonnull JSONString, SDCSparkScanScanningPrecision *_Nonnull scanningPrecision)

Added in version 6.19.0

Deprecated since version 6.23.0: Replaced by SDCSparkScanPreviewBehaviorFromJSONString(JSONString, previewBehavior).

NSStringFromSparkScanViewHandMode(handMode)
NSString *_Nonnull NSStringFromSparkScanViewHandMode(SDCSparkScanViewHandMode handMode)

Added in version 6.15.0

Deprecated since version 6.26.0: This function will be removed in the future.

SDCSparkScanViewHandModeFromJSONString(JSONString, handMode)
BOOL SDCSparkScanViewHandModeFromJSONString(NSString *_Nonnull JSONString, SDCSparkScanViewHandMode *_Nonnull handMode)

Added in version 6.15.0

Deprecated since version 6.26.0: This function will be removed in the future.