SBSDKIDCardScannerViewControllerDelegate
@protocol SBSDKIDCardScannerViewControllerDelegate <NSObject>
The delegate protocol for the SBSDKIDCardScannerViewController.
-
Informs the delegate that an ID card has been detected or recognized successfully.
Declaration
Objective-C
- (void)idCardScannerViewController: (nonnull SBSDKIDCardScannerViewController *)controller didRecognizeIDCard: (nonnull SBSDKIDCardRecognizerResult *)idCardResult onImage:(nonnull UIImage *)image;
Swift
func idCardScannerViewController(_ controller: SBSDKIDCardScannerViewController, didRecognizeIDCard idCardResult: SBSDKIDCardRecognizerResult, on image: UIImage)
Parameters
controller
The SBSDKIDCardScannerViewController instance that detected/recognized the ID card.
idCardResult
The result of the detection or recognition.
image
The original image where the ID card has been detected on.
-
Informs the delegate that a full resolution image will be taken and recognized after a successful detection. You may use this function to show a progress indicator during the capture-and-recognize process. Function is called on the main thread.
Declaration
Objective-C
- (void)idCardScannerViewControllerWillCaptureImage: (nonnull SBSDKIDCardScannerViewController *)controller;
Swift
optional func idCardScannerViewControllerWillCaptureImage(_ controller: SBSDKIDCardScannerViewController)
Parameters
controller
The SBSDKIDCardScannerViewController instance that detected/recognized the ID card.
-
Informs the delegate that an ID card has been detected, but the recognition after image capture has failed.
Declaration
Objective-C
- (void)idCardScannerViewController: (nonnull SBSDKIDCardScannerViewController *)controller didFailRecognition: (nonnull SBSDKIDCardRecognizerResult *)idCardResult onImage:(nonnull UIImage *)image;
Swift
optional func idCardScannerViewController(_ controller: SBSDKIDCardScannerViewController, didFailRecognition idCardResult: SBSDKIDCardRecognizerResult, on image: UIImage)
Parameters
controller
The SBSDKIDCardScannerViewController instance that detected/recognized the ID card.
idCardResult
The result of the detection or recognition.
image
The original image where the ID card has been detected on.