Note

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

Text Definition

Defined in framework ScanditBarcodeCapture

TextDefinition
class TextDefinition : NSObject, ScanComponentDefinition

Added in version 8.0.0

A class that holds the definition for a text expected to be scanned as part of a certain ScanItemDefinition.

You can use the builder pattern to configure a text definition:

let totalPriceIdentifier = TextIdentifier()
let definition = TextDefinition(totalPriceIdentifier)
  .optional(false)
  .semantics(.totalPrice)
init
init(_ identifier: TextIdentifier)

Added in version 8.0.0

A constructor that receives the identifier for the text definition.

identifier
var identifier: TextIdentifier { get }

Added in version 8.0.0

The unique identifier for this component.

location
var location: Quadrilateral? { get, set }

Added in version 8.0.0

The expected location of the text.

optional
var optional: Bool { get, set }

Added in version 8.0.0

Whether the text is optional.

semantics
var semantics: TextSemantics? { get, set }

Added in version 8.0.0

A semantic type to be applied to the text definition.