Custom Barcode
Defined in framework ScanditLabelCapture
- CustomBarcode
open class CustomBarcode : BarcodeField
Added in version 6.21.0
Defines a barcode field with customizable symbology support and validation regexes. This field type allows you to specify which barcode symbologies should be recognized and optionally apply data validation regexes to the decoded content.
Note
A custom barcode field must be configured with at least one symbology. Creating one with an empty symbology set raises an error.
- init(name:symbologySettings:)
init(name: String, symbologySettings: Array<SymbologySettings>)
Added in version 6.21.0
Creates a new custom barcode field definition with the given name and symbology settings.
- field(withName:symbologySettings:)
open class func field(withName name: String, symbologySettings: Array<SymbologySettings>) ->
SelfAdded in version 6.21.0
Creates a new custom barcode field definition with the given name and symbology settings.
- init(name:symbologies:)
convenience init(name: String, symbologies: Set<Symbology>)
Added in version 6.21.0
Creates a new custom barcode field definition with the given name and supported symbologies.
- init(name:symbology:)
init(name: String, symbology: Symbology)
Added in version 6.21.0
Creates a new custom barcode field definition with the given name and symbology settings.
- field(withName:symbology:)
open class func field(withName name: String, symbology: Symbology) ->
SelfAdded in version 6.21.0
Creates a new custom barcode field definition with the given name and symbology settings.
- field(name:symbologies:)
static func field(name: String, symbologies: Set<Symbology>) -> CustomBarcode
Added in version 6.21.0
Creates a new custom barcode field definition with the given name and supported symbologies.
- setLocation(rect:)
open func setLocation(rect: CGRect) ->
VoidAdded in version 6.21.0
Sets the location of the barcode field using a rectangle.
- setLocation(left:top:right:bottom:)
open func setLocation(left: CGFloat, top: CGFloat, right: CGFloat, bottom: CGFloat) ->
VoidAdded in version 6.21.0
Sets the location of the barcode field using coordinates.
- setLocation(type:)
open func setLocation(type location: LabelFieldLocationType) ->
VoidAdded in version 6.21.0
Sets the location of the barcode field using a predefined location type.
- anchorRegexes
open var anchorRegexes: Array<String>? { get, set }
Added in version 8.0.0
Context-identifying keywords or phrases used to distinguish between fields that may have similar patterns. These patterns help Smart Label Capture identify which field the captured data belongs to when multiple fields could match the same regex.
For example, when a label contains both expiry date and packing date fields, you can use anchorRegexes like [“exp”, “expiry”] for the expiry date field and [“pack”, “packing”] for the packing date field to help the system correctly identify which date is which.