SBSDKTrackedBarcodeInfoViewable
@objc
public protocol SBSDKTrackedBarcodeInfoViewable
A protocol that defines the methods and properties required for a custom tracking view to be displayed over detected barcodes using the SBSDKBarcodeTrackingOverlayConfiguration
.
The custom view must conform to this protocol in order to be used as an overlay on top of the detected barcodes.
-
Creates and returns an instance of the conforming
SBSDKTrackedBarcodeInfoView
.Declaration
Swift
@objc static func make(withBarcode: SBSDKBarcodeScannerResult) -> SBSDKTrackedBarcodeInfoView
Parameters
withBarcode
The barcode to be tracked.
Return Value
An instance of the conforming
SBSDKTrackedBarcodeInfoView
. -
Updates the frame of the tracking view to match the position and size of the associated barcode.
Note
Implement this method to update the position and size of the tracking view based on the detected barcode’s frame.
Declaration
Swift
@objc func update(barcodeFrame: CGRect, isSelected: Bool, textStyle: SBSDKBarcodeTrackedViewTextStyle, polygonStyle: SBSDKBarcodeTrackedViewPolygonStyle)
Parameters
barcodeFrame
The frame of the detected barcode within the coordinate system of the tracking view’s superview.
isSelected
A boolean value that indicates whether the associated barcode is selected.
textStyle
The text style of the receiver.
polygonStyle
The polygon style of the receiver.