SBSDKUIBarcodeScannerViewControllerDelegate
@protocol
SBSDKUIBarcodeScannerViewControllerDelegate <SBSDKUIViewControllerDelegate>
Delegate protocol for ‘SBSDKUIBarcodeScannerViewController’.
-
Informs the delegate that one or more barcodes have been detected.
Implementing this delegate function will use the new Scanbot barcode detector: see ‘SBSDKBarcodeType’.
Declaration
Objective-C
- (void)qrBarcodeDetectionViewController: (nonnull SBSDKUIBarcodeScannerViewController *)viewController didDetectResults: (nonnull NSArray<SBSDKBarcodeScannerResult *> *) barcodeResults;
Swift
optional func qrBarcodeDetectionViewController(_ viewController: SBSDKUIBarcodeScannerViewController, didDetect barcodeResults: [SBSDKBarcodeScannerResult])
Parameters
viewController
The detection view controller that detected barcode(s).
barcodeResults
An array of SBSDKBarcodeScannerResult objects containing recently detected barcodes.
-
Informs the delegate about capturing barcode image. Fires only if
barcodeImageGenerationType
behavior parameter is not SBSDKBarcodeImageGenerationTypeNoneImplementing this delegate function will use the new Scanbot barcode detector: see ‘SBSDKBarcodeType’.
Declaration
Objective-C
- (void)qrBarcodeDetectionViewController: (nonnull SBSDKUIBarcodeScannerViewController *)viewController didCaptureBarcodeImage:(nullable UIImage *)barcodeImage imageURL:(nullable NSURL *)imageURL;
Swift
optional func qrBarcodeDetectionViewController(_ viewController: SBSDKUIBarcodeScannerViewController, didCaptureBarcodeImage barcodeImage: UIImage?, imageURL: URL?)
Parameters
viewController
The detection view controller that detected barcode(s).
barcodeImage
A device-orientation-corrected barcode image.
imageURL
URL, where frameImage is saved. Stored in default storage of SBSDKUIBarcodeImageStorage.
-
Optional: informs the delegate that the ‘SBSDKUIBarcodeScannerViewController’ has been cancelled and dismissed.
Declaration
Objective-C
- (void)qrBarcodeDetectionViewControllerDidCancel: (nonnull SBSDKUIBarcodeScannerViewController *)viewController;
Swift
optional func qrBarcodeDetectionViewControllerDidCancel(_ viewController: SBSDKUIBarcodeScannerViewController)
Parameters
viewController
The ‘SBSDKUIBarcodeScannerViewController’ that did dismiss.
-
Optional: informs the delegate that the ‘SBSDKUIBarcodeScannerViewController’ has been cancelled and dismissed by timeout.
Declaration
Objective-C
- (void)qrBarcodeDetectionViewControllerDidTimeout: (nonnull SBSDKUIBarcodeScannerViewController *)viewController;
Swift
optional func qrBarcodeDetectionViewControllerDidTimeout(_ viewController: SBSDKUIBarcodeScannerViewController)
Parameters
viewController
The ‘SBSDKUIBarcodeScannerViewController’ that did dismiss. Note: If this method is not implemented, viewController will try to call
-(void)qrBarcodeDetectionViewControllerDidCancel:(nonnull SBSDKUIBarcodeScannerViewController *)viewController