Barcode Sequence Scan Area Restriction Settings
Defined in framework ScanditBarcodeCapture
- BarcodeSequenceScanAreaRestrictionSettings
open class BarcodeSequenceScanAreaRestrictionSettings : NSObject
Added in version 8.5.4
Settings for the scanning restriction area of BarcodeSequenceView: a horizontal band across the full width of the preview that limits sequencing to one shelf row.
Only barcodes inside the band are decoded and added to the sequence; barcodes outside it are ignored. The band is centred vertically and spans the full preview width, so only its height is configurable.
The view writes enabled and height back into the settings object when the user changes them on screen, so they can be read back and persisted across sessions. A drag writes the height back in the unit it was set in, so a fraction stays a fraction.
BarcodeSequenceView.scanAreaRestrictionSettings defaults to nil and the feature is off until a settings object is assigned.
- init()
init()
Added in version 8.5.4
Constructs a new settings object for the scanning restriction area, with the restriction area disabled and the band at its default height.
- enabled
open var enabled:
Bool{ get, set }Added in version 8.5.4
Indicates whether the restriction area is active. While active, the band restricts scanning and is drawn together with its delimiter lines and the dimming outside them.
Independent of toggleable, which only decides whether the user is offered a button to flip this.
Default is false.
- adjustable
open var adjustable:
Bool{ get, set }Added in version 8.5.4
Indicates whether drag handles are shown so the user can resize the band. Dragging either handle expands or restricts the band evenly in both directions, keeping it centred. The band cannot be resized while capture is running.
When the band is close to the full height of the preview, its handles sit near the top and bottom edges of the screen, where the system’s own edge gestures take precedence over dragging. This is most noticeable in landscape, where the preview spans the shorter dimension. To let users drag the handles there, override
preferredScreenEdgesDeferringSystemGesturesin the view controller presenting the view:override var preferredScreenEdgesDeferringSystemGestures: UIRectEdge { .all }
Default is true.
- toggleable
open var toggleable:
Bool{ get, set }Added in version 8.5.4
Indicates whether a button is shown that lets the user turn the restriction area on and off. When disabled, the band is governed entirely by enabled.
The button sits in the bottom right corner of the preview, on the right in a right-to-left layout too, so that it stays beside the capture bar. A control anchored to the same corner, such as the torch control with BarcodeSequenceView.torchControlPosition set to bottom right, overlaps it; anchor such controls elsewhere.
Default is true.
- height
open var height: FloatWithUnit { get, set }
Added in version 8.5.4
Height of the band, expressed as a fraction of the preview height or in points.
Values that resolve below the minimum are raised to it, so the drag handles keep a usable touch target.
The minimum for iOS is 44 points.
Default is 0.3 of the preview height.