SBSDKBarcodeScannerViewControllerDelegate
@protocol SBSDKBarcodeScannerViewControllerDelegate <NSObject>
A delegate protocol to customize the behavior, look and feel of the SBSDKBarcodeScannerViewControllerDelegate.
-
Asks the delegate if the receiver should detect barcodes. Optional.
Declaration
Objective-C
- (BOOL)barcodeScannerControllerShouldDetectBarcodes: (nonnull SBSDKBarcodeScannerViewController *)controller;
Swift
optional func barcodeScannerControllerShouldDetectBarcodes(_ controller: SBSDKBarcodeScannerViewController) -> Bool
Parameters
controller
The calling SBSDKBarcodeScannerViewController.
-
Informs the delegate that the receiver has detected some barcodes. Optional.
Declaration
Objective-C
- (void)barcodeScannerController: (nonnull SBSDKBarcodeScannerViewController *)controller didDetectBarcodes: (nonnull NSArray<SBSDKBarcodeScannerResult *> *)codes;
Swift
optional func barcodeScannerController(_ controller: SBSDKBarcodeScannerViewController, didDetectBarcodes codes: [SBSDKBarcodeScannerResult])
Parameters
controller
The calling SBSDKBarcodeScannerViewController.
codes
Array of SBSDKBarcodeScannerResult containing the detected barcodes.
-
Returns captured barcode image. Will fire only if
barcodeImageGenerationType
parameter is notSBSDKBarcodeImageGenerationTypeNone
. Optional.Declaration
Objective-C
- (void)barcodeScannerController: (nonnull SBSDKBarcodeScannerViewController *)controller didCaptureBarcodeImage:(nonnull UIImage *)barcodeImage;
Swift
optional func barcodeScannerController(_ controller: SBSDKBarcodeScannerViewController, didCaptureBarcodeImage barcodeImage: UIImage)
Parameters
controller
The calling SBSDKBarcodeScannerViewController.
barcodeImage
A captured device-orientation-corrected barcode image.
-
Informs the delegate that the receiver did change the rect of the view finder.
Declaration
Objective-C
- (void)barcodeScannerController: (nonnull SBSDKBarcodeScannerViewController *)controller didChangeViewFinderRect:(CGRect)rect;
Swift
optional func barcodeScannerController(_ controller: SBSDKBarcodeScannerViewController, didChangeViewFinderRect rect: CGRect)
Parameters
controller
The calling SBSDKBarcodeScannerViewController.
rect
The new rectangle of the view finder in the controllers view space. Equals to CGRectZero when the view finder is not visible.