Label Capture Basic Overlay Delegate

Defined in framework ScanditLabelCapture

SDCLabelCaptureBasicOverlayDelegate
@protocol SDCLabelCaptureBasicOverlayDelegate <NSObject>

Added in version 6.0.0

SDCLabelCaptureBasicOverlayDelegate can be implemented to customize the visual appearance of highlighted labels and their fields. When label capture identifies a new field, or when the SDCLabelField.state property changes, labelCaptureBasicOverlay:brushForField:ofLabel: is called to determine the brush of the field.

- labelCaptureBasicOverlay:brushForField:ofLabel:
- (nullable SDCBrush *)labelCaptureBasicOverlay:(nonnull SDCLabelCaptureBasicOverlay *)overlay
                                  brushForField:(nonnull SDCLabelField *)field
                                        ofLabel:(nonnull SDCCapturedLabel *)label

Added in version 6.0.0

Called for each field to determine its brush whenever the field’s state changes. In case the field is tracked over multiple frames and its state does not change, the same brush is used. The field brush can be changed by explicit calls to SDCLabelCaptureBasicOverlay.setBrush:forField:ofLabel:.

- labelCaptureBasicOverlay:brushForLabel:
- (nullable SDCBrush *)labelCaptureBasicOverlay:(nonnull SDCLabelCaptureBasicOverlay *)overlay
                                  brushForLabel:(nonnull SDCCapturedLabel *)label

Added in version 6.0.0

Called for each label to determine its brush whenever one of the label’s fields changes it’s state/data. In case the field is tracked over multiple frames and none of the fields changes its state, the same brush is used. The label brush can be changed by explicit calls to SDCLabelCaptureBasicOverlay.setBrush:forLabel:.

- labelCaptureBasicOverlay:didTapLabel:
- (void)labelCaptureBasicOverlay:(nonnull SDCLabelCaptureBasicOverlay *)overlay
                     didTapLabel:(nonnull SDCCapturedLabel *)label

Added in version 6.4.0

Called every time a captured label is tapped. Called from the main thread.

If you are adding a UIGestureRecognizer to the data capture view, ensure that the cancelsTouchesInView property is set to NO as otherwise tap gestures will be cancelled instead of successfully completing.