Barcode Sequence Highlight
Defined in framework ScanditBarcodeCapture
- BarcodeSequenceHighlight
protocol BarcodeSequenceHighlight : NSObjectProtocol
Added in version 8.5.4
A highlight you supply, drawn over one sequenced barcode in place of the built-in circle. Supply one per barcode through BarcodeSequenceHighlightProvider.
The view lives as long as the barcode is tracked. Reordering, rejection and pausing are reported through orderOnTray and state, and none of them replaces the view or asks the provider again.
The view is kept centered on the barcode’s location at its own size, and is never reshaped or rotated, so it has to carry a size of its own: either a frame it sets itself, or, when it is left to Auto Layout, whatever its constraints or its intrinsic content size resolve to. A view with neither is not drawn.
The size is taken in whole points, so a view that resolves to a fractional one is drawn at the nearest point rather than across a pixel boundary.
Per-barcode state belongs on the highlight instance, which has the same lifetime as the view. The SequencedBarcode handed to the provider is built per request and is not an identity to key on.
Supply a separate view for each barcode. Returning one that is already highlighting another barcode moves it to the new one and leaves the old highlight empty.
- state
open var state: BarcodeSequenceState { get, set }
Added in version 8.5.4
The state of the BarcodeSequenceView. Written by the SDK before the view is displayed, and again whenever the state changes. Assigning it has no effect on the sequence.
- orderOnTray
open var orderOnTray:
Int{ get, set }Added in version 8.5.4
The position of the barcode on its tray. Written by the SDK before the view is displayed, and again whenever the position changes. Assigning it has no effect on the sequence.
orderOnTrayis 0-based and is negative when the barcode is not associated with a tray, which is the only signal a rejected barcode carries. The built-in highlight displaysorderOnTray + 1.