Barcode AR Info Annotation

Defined in framework ScanditBarcodeCapture

enum BarcodeArInfoAnnotationWidthPreset

Added in version 7.1.0

The available width options for an info annotation.

small

Added in version 7.1.0

Small width. Recommended for annotations that contain only text or icon, and do not include a header or footer.

medium

Added in version 7.1.0

Medium width.

large

Added in version 7.1.0

Large width.

enum BarcodeArInfoAnnotationAnchor

Added in version 7.1.0

The available anchor options for an info annotation.

left

Added in version 7.1.0

The annotation is anchored at its left edge.

right

Added in version 7.1.0

The annotation is anchored at its right edge.

bottom

Added in version 7.1.0

The annotation is anchored at its bottom-center point.

top

Added in version 7.1.0

The annotation is anchored at its top-center point.

BarcodeArInfoAnnotationDelegate
protocol BarcodeArInfoAnnotationDelegate : NSObjectProtocol

Added in version 7.1.0

The listener for the info annotation.

barcodeArInfoAnnotationDidTapHeader
optional func barcodeArInfoAnnotationDidTapHeader(_ annotation: BarcodeArInfoAnnotation) -> Void

Added in version 7.1.0

Called when the annotation header is tapped. Called only if BarcodeArInfoAnnotation.isEntireAnnotationTappable is false.

barcodeArInfoAnnotationDidTapFooter
optional func barcodeArInfoAnnotationDidTapFooter(_ annotation: BarcodeArInfoAnnotation) -> Void

Added in version 7.1.0

Called when the annotation footer is tapped. Called only if BarcodeArInfoAnnotation.isEntireAnnotationTappable is false.

barcodeArInfoAnnotation
optional func barcodeArInfoAnnotation(_ annotation: BarcodeArInfoAnnotation, didTapLeftIconFor component: BarcodeArInfoAnnotationBodyComponent, at componentIndex: Int) -> Void

Added in version 7.1.0

Called when the left icon of an annotation component is tapped. componentIndex specifies the index of the component containing the tapped icon within the BarcodeArInfoAnnotation.body array. Called only if BarcodeArInfoAnnotation.isEntireAnnotationTappable is false.

barcodeArInfoAnnotation
optional func barcodeArInfoAnnotation(_ annotation: BarcodeArInfoAnnotation, didTapRightIconFor component: BarcodeArInfoAnnotationBodyComponent, at componentIndex: Int) -> Void

Added in version 7.1.0

Called when the right icon of an annotation component is tapped. componentIndex specifies the index of the component containing the tapped icon within the BarcodeArInfoAnnotation.body array. Called only if BarcodeArInfoAnnotation.isEntireAnnotationTappable is false.

barcodeArInfoAnnotationDidTap
optional func barcodeArInfoAnnotationDidTap(_ annotation: BarcodeArInfoAnnotation) -> Void

Added in version 7.1.0

Called when the annotation is tapped. Called only if BarcodeArInfoAnnotation.isEntireAnnotationTappable is true.

BarcodeArInfoAnnotation
open class BarcodeArInfoAnnotation : UIView, BarcodeArAnnotation

Added in version 7.1.0

Info annotations are tooltips that display text and icons, structured as an array of body components. Each body component contains text and may include optional tappable icons on both the left and right sides.

In addition to the body components, info annotations can include an optional header, and footer. By default, they appear automatically when the corresponding barcode is scanned. Info annotations are available in three predefined widths, with their height dynamically adjusting to fit the content. Here are some examples:

../../../_images/info_annotation_without_header.png ../../../_images/info_annotation_with_header.png ../../../_images/info_annotation_with_button.png

Body component only.

Body component and header.

Body component with attributed text and tappable icon.

init
init(barcode: Barcode)

Added in version 7.1.0

Constructs a new instance with the given barcode.

barcode
open var barcode: Barcode { get }

Added in version 7.1.0

The barcode instance for the annotation.

hasTip
open var hasTip: Bool { get, set }

Added in version 7.1.0

Whether the annotation has a tip. The default value is true.

isEntireAnnotationTappable
open var isEntireAnnotationTappable: Bool { get, set }

Added in version 7.1.0

If false, each individual element within the annotation (header, footer, icons in body components) is tappable. If true, the entire annotation is tappable.

anchor
open var anchor: BarcodeArInfoAnnotationAnchor { get, set }

Added in version 7.1.0

The annotation anchor. The default value is BarcodeArInfoAnnotationAnchor.bottom.

annotationTrigger
open var annotationTrigger: BarcodeArAnnotationTrigger { get, set }

Added in version 7.1.0

The trigger that causes the annotation to be presented. By default is BarcodeArAnnotationTrigger.highlightTapAndBarcodeScan.

width
open var width: BarcodeArInfoAnnotationWidthPreset { get, set }

Added in version 7.1.0

The annotation width. The default value is BarcodeArInfoAnnotationWidthPreset.small.

body
open var body: Array<BarcodeArInfoAnnotationBodyComponent> { get, set }

Added in version 7.1.0

The annotation body, represented as an array of body components. The default value is [].

header
open var header: BarcodeArInfoAnnotationHeader? { get, set }

Added in version 7.1.0

The annotation header. The default value is null.

footer
open var footer: BarcodeArInfoAnnotationFooter? { get, set }

Added in version 7.1.0

The annotation footer. The default value is null.

backgroundColor
open var backgroundColor: UIColor { get, set }

Added in version 7.1.0

The background color. The default value is white.

delegate
open weak var delegate: BarcodeArInfoAnnotationDelegate? { get, set }

Added in version 7.1.0

An object that receives notifications for UI-related events.