Barcode Selection Basic Overlay

Defined in framework ScanditBarcodeCapture

enum BarcodeSelectionBasicOverlayStyle

Added in version 6.10.0

The style of the BarcodeSelectionBasicOverlay.

frame

Added in version 6.10.0

Style that draws the highlights as a rectangular frame and adds an animation for when a code newly appears.

dot

Added in version 6.10.0

Style that draws the highlights as a dot and adds an animation for when a code newly appears.

jsonString
open var jsonString: String { get }

Added in version 6.10.0

Returns the string representation of the overlay style.

BarcodeSelectionBrushProvider
protocol BarcodeSelectionBrushProvider : NSObjectProtocol

Added in version 6.17.0

Interface for applying custom brushes to recognized barcodes.

brush
open func brush(for barcode: Barcode) -> Brush?

Added in version 6.17.0

Return the brush to apply to the given barcode. A non-null brush returned by this method overrides any other brush set for the barcode.

BarcodeSelectionBasicOverlay
open class BarcodeSelectionBasicOverlay : UIView, DataCaptureOverlay

Added in version 6.6.0

An overlay for DataCaptureView that shows a simple augmentation over each selected barcode.

To display the augmentations, this overlay must be attached to a DataCaptureView. This may be done either by creating it with init() with a non-null view parameter or by passing this overlay to DataCaptureView.addOverlay().

A user of this class may configure the appearance of the augmentations by configuring the brush properties.

init
convenience init(barcodeSelection: BarcodeSelection, view: DataCaptureView?)

Added in version 6.6.0

Constructs a new barcode selection basic overlay for the barcode selection instance. The overlay is automatically added to the view.

init
convenience init(barcodeSelection: BarcodeSelection, view: DataCaptureView?, style: BarcodeSelectionBasicOverlayStyle)

Added in version 6.10.0

Constructs a new barcode selection basic overlay for the barcode selection instance with the specified style. The overlay is automatically added to the view.

init
convenience init(barcodeSelection: BarcodeSelection)

Added in version 6.6.0

Constructs a new barcode selection basic overlay for the barcode selection instance. For the overlay to be displayed on screen, it must be added to a DataCaptureView.

init
convenience init(barcodeSelection: BarcodeSelection, style: BarcodeSelectionBasicOverlayStyle)

Added in version 6.10.0

Constructs a new barcode selection basic overlay for the barcode selection instance with the specified style. For the overlay to be displayed on screen, it must be added to a DataCaptureView.

init
convenience init(jsonString JSONString: String, barcodeSelection mode: BarcodeSelection) throws

Added in version 6.14.0

Constructs a new barcode selection basic overlay with the provided JSON serialization.

For the overlay to be displayed on screen, it must be added to a DataCaptureView.

defaultTrackedBrush
open class func defaultTrackedBrush(forStyle style: BarcodeSelectionBasicOverlayStyle) -> Brush

Added in version 6.10.1

Returns the default tracked brush for the given style.

defaultAimedBrush
open class func defaultAimedBrush(forStyle style: BarcodeSelectionBasicOverlayStyle) -> Brush

Added in version 6.10.1

Returns the default aimed brush for the given style.

defaultSelectedBrush
open class func defaultSelectedBrush(forStyle style: BarcodeSelectionBasicOverlayStyle) -> Brush

Added in version 6.10.1

Returns the default selected brush for the given style.

defaultSelectingBrush
open class func defaultSelectingBrush(forStyle style: BarcodeSelectionBasicOverlayStyle) -> Brush

Added in version 6.10.1

Returns the default selecting brush for the given style.

trackedBrush
open var trackedBrush: Brush { get, set }

Added in version 6.6.0

The brush applied to recognized tracked barcodes, by default the value is set to defaultTrackedBrush(). Setting this brush to Brush.transparent() hides all tracked barcodes.

aimedBrush
open var aimedBrush: Brush { get, set }

Added in version 6.6.0

The brush applied to the barcode that is currently being aimed at.

By default the value is set to defaultAimedBrush().

selectedBrush
open var selectedBrush: Brush { get, set }

Added in version 6.6.0

The brush applied to selected barcodes, by default the value is set to defaultSelectedBrush(). Setting this brush to Brush.transparent() hides all selected barcodes.

selectingBrush
open var selectingBrush: Brush { get, set }

Added in version 6.6.0

The brush applied to the barcodes for the short moment when they are being selected.

By default the value is set to defaultSelectingBrush().

shouldShowScanAreaGuides
open var shouldShowScanAreaGuides: Bool { get, set }

Added in version 6.6.0

When set to true, this overlay will visualize the active scan area used for BarcodeSelection. This is useful to check margins defined on the DataCaptureView are set correctly. This property is meant for debugging during development and is not intended for use in production.

By default this property is false.

shouldShowHints
open var shouldShowHints: Bool { get, set }

Added in version 6.6.0

When set to true, this overlay will visualize some hints explaining how to use barcode selection.

By default this property is true.

viewfinder
open var viewfinder: any Viewfinder { get }

Added in version 6.6.0

The viewfinder of the overlay. The viewfinder is only visible when the selection type is BarcodeSelectionAimerSelection.

clearSelectedBarcodeBrushes
open func clearSelectedBarcodeBrushes() -> Void

Added in version 6.6.0

Clears all currently displayed visualizations for the on screen barcodes.

This only applies to the currently displayed barcodes, the visualizations for the new ones will still appear.

setTextForSelectOrDoubleTapToFreezeHint
open func setTextForSelectOrDoubleTapToFreezeHint(_ text: String) -> Void

Added in version 6.14.0

Sets the text of the hint which suggests to use double tap gesture to freeze capture view.

setTextForTapToSelectHint
open func setTextForTapToSelectHint(_ text: String) -> Void

Added in version 6.14.0

Sets the text of the hint which suggests to use tap gesture to select barcodes.

setTextForDoubleTapToUnfreezeHint
open func setTextForDoubleTapToUnfreezeHint(_ text: String) -> Void

Added in version 6.14.0

Sets the text of the hint which suggests to use double tap gesture to unfreeze capture view.

setTextForTapAnywhereToSelectHint
open func setTextForTapAnywhereToSelectHint(_ text: String) -> Void

Added in version 6.14.0

Sets the text of the hint which suggests to use tap gesture anywhere on the screen to select.

setTextForAimToSelectAutoHint
open func setTextForAimToSelectAutoHint(_ text: String) -> Void

Added in version 6.18.0

Sets the text of the hint which suggests to aim at a barcode to scan it.

setAimedBarcodeBrushProvider
open func setAimedBarcodeBrushProvider(_ brushProvider: (any BarcodeSelectionBrushProvider)?) -> Void

Added in version 6.17.0

Sets the brush provider for aimed barcode.

setTrackedBarcodeBrushProvider
open func setTrackedBarcodeBrushProvider(_ brushProvider: (any BarcodeSelectionBrushProvider)?) -> Void

Added in version 6.17.0

Sets the brush provider for tracked barcode.

update
open func update(fromJSONString JSONString: String) throws -> Void

Added in version 6.14.0

Updates the overlay according to a JSON serialization.

frozenBackgroundColor
open var frozenBackgroundColor: UIColor { get, set }

Added in version 6.12.0

The overlay’s background color when in frozen state. This color will be on top of the video preview but below the highlights. Semitransparent black by default.

style
open var style: BarcodeSelectionBasicOverlayStyle { get }

Added in version 6.10.0

The overlay style. Defaults to Frame.