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 patterns. This field type allows you to specify which barcode symbologies should be recognized and optionally apply data validation patterns to the decoded content.
- init
init(name: String, symbologySettings: Array<SymbologySettings>)
Added in version 6.21.0
Create a new custom barcode field definition with the given name and symbology settings.
- field
open class func field(withName name: String, symbologySettings: Array<SymbologySettings>) ->
SelfAdded in version 6.21.0
Create a new custom barcode field definition with the given name and symbology settings.
- init
init(name: String, symbologies: Set<NSNumber>)
Added in version 6.21.0
Create a new custom barcode field definition with the given name and symbology settings.
- field
open class func field(withName name: String, symbologies: Set<NSNumber>) ->
SelfAdded in version 6.21.0
Create a new custom barcode field definition with the given name and symbology settings.
- init
init(name: String, symbology: Symbology)
Added in version 6.21.0
Create a new custom barcode field definition with the given name and symbology settings.
- field
open class func field(withName name: String, symbology: Symbology) ->
SelfAdded in version 6.21.0
Create a new custom barcode field definition with the given name and symbology settings.
- setLocation
open func setLocation(rect: CGRect) ->
VoidAdded in version 6.21.0
Set the location of the barcode field using a rectangle.
- setLocation
open func setLocation(left: CGFloat, top: CGFloat, right: CGFloat, bottom: CGFloat) ->
VoidAdded in version 6.21.0
Set the location of the barcode field using coordinates.
- setLocation
open func setLocation(type location: LabelFieldLocationType) ->
VoidAdded in version 6.21.0
Set the location of the barcode field using a predefined location type.
- dataTypePatterns
open var dataTypePatterns: Array<String>? { get, set }
Added in version 6.21.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 pattern.
For example, when a label contains both expiry date and packing date fields, you can use dataTypePatterns 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.