MBIDocumentCaptureOverlayViewControllerDelegate
@protocol MBIDocumentCaptureOverlayViewControllerDelegate <NSObject>
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: 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) documentCaptureOverlayViewControllerDidFinishScanning: (nonnull MBIDocumentCaptureOverlayViewController *) documentCaptureOverlayViewController state: (MBIRecognizerResultState) state;
Swift
func documentCaptureOverlayViewControllerDidFinishScanning(_ documentCaptureOverlayViewController: MBIDocumentCaptureOverlayViewController, state: MBIRecognizerResultState)
Parameters
documentCaptureOverlayViewController
documentCaptureOverlayViewController Scanning view controller responsible for document capture
state
state of scanning
-
Scanning library was closed, usually by the user pressing close button and cancelling the scan
Declaration
Objective-C
- (void)documentCaptureOverlayViewControllerDidTapClose: (nonnull MBIDocumentCaptureOverlayViewController *) documentCaptureOverlayViewController;
Swift
func documentCaptureOverlayViewControllerDidTapClose(_ documentCaptureOverlayViewController: MBIDocumentCaptureOverlayViewController)
Parameters
documentCaptureOverlayViewController
Scanning view controller responsible for document capture
-
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) documentCaptureOverlayViewControllerDidCaptureHighResolutionImage: (nonnull MBIDocumentCaptureOverlayViewController *) documentCaptureOverlayViewController highResImage: (nonnull MBIImage *)highResImage state: (MBIRecognizerResultState) state;
Swift
func documentCaptureOverlayViewControllerDidCaptureHighResolutionImage(_ documentCaptureOverlayViewController: MBIDocumentCaptureOverlayViewController, highResImage: MBIImage, state: MBIRecognizerResultState)
Parameters
documentCaptureOverlayViewController
Scanning view controller responsible for document capture
highResImage
High resolution image of finished scan