MBLegacyDocumentVerificationOverlayViewControllerDelegate
Objective-C
@protocol MBLegacyDocumentVerificationOverlayViewControllerDelegate <NSObject>
Swift
protocol MBLegacyDocumentVerificationOverlayViewControllerDelegate : NSObjectProtocol
Protocol for obtaining scanning results
-
Scanning library did output scanning results
Depending on how you want to treat the result, you might want to dismiss the scanningViewController here.
This method is the default way for getting access to results of scanning.
Note:
- there may be 0, 1, or more than one scanning results.
- each scanning result belongs to a common MBRecognizerResult type
handle different types differently
NOTE: This method is called on background processing thread. Make sure that you dispatch all your UI API calls to main thread.
Declaration
Objective-C
- (void) legacyDocumentVerificationOverlayViewControllerDidFinishScanning: (nonnull MBLegacyDocumentVerificationOverlayViewController *) documentVerificationOverlayViewController state: (MBRecognizerResultState) state;
Swift
func legacyDocumentVerificationOverlayViewControllerDidFinishScanning(_ documentVerificationOverlayViewController: MBLegacyDocumentVerificationOverlayViewController, state: MBRecognizerResultState)
Parameters
documentVerificationOverlayViewController
documentVerificationOverlayViewController Scanning view controller responsible for scanning
state
state of scanning
-
Scanning library was closed, usually by the user pressing close button and cancelling the scan
Declaration
Objective-C
- (void)legacyDocumentVerificationOverlayViewControllerDidTapClose: (nonnull MBLegacyDocumentVerificationOverlayViewController *) documentVerificationOverlayViewController;
Swift
func legacyDocumentVerificationOverlayViewControllerDidTapClose(_ documentVerificationOverlayViewController: MBLegacyDocumentVerificationOverlayViewController)
Parameters
documentVerificationOverlayViewController
Scanning view controller responsible for scanning
-
Called when scanning library finished scanning first side of the document
Declaration
Objective-C
- (void) legacyDocumentVerificationOverlayViewControllerDidFinishScanningFirstSide: (nonnull MBLegacyDocumentVerificationOverlayViewController *) documentVerificationOverlayViewController;
Swift
optional func legacyDocumentVerificationOverlayViewControllerDidFinishScanningFirstSide(_ documentVerificationOverlayViewController: MBLegacyDocumentVerificationOverlayViewController)
Parameters
documentVerificationOverlayViewController
documentVerificationOverlayViewController Scanning view controller responsible for scanning
-
Scanning library did output high resolution image
NOTE: This method is called on background processing thread. Make sure that you dispatch all your UI API calls to main thread.
Declaration
Objective-C
- (void) legacyDocumentVerificationOverlayViewControllerDidCaptureHighResolutionImage: (nonnull MBLegacyDocumentVerificationOverlayViewController *) documentVerificationOverlayViewController highResImage: (nonnull MBImage *) highResImage state: (MBLegacyDocumentVerificationHighResImageState) state;
Swift
optional func legacyDocumentVerificationOverlayViewControllerDidCaptureHighResolutionImage(_ documentVerificationOverlayViewController: MBLegacyDocumentVerificationOverlayViewController, highResImage: MBImage, state: MBLegacyDocumentVerificationHighResImageState)
Parameters
documentVerificationOverlayViewController
Scanning view controller responsible for scanning
highResImage
High resolution image of finished scan