MBCRecognizerRunnerViewControllerDelegate
Objective-C
@protocol MBCRecognizerRunnerViewControllerDelegate <NSObject>Swift
protocol MBCRecognizerRunnerViewControllerDelegate : NSObjectProtocolProtocol for MBCRecognizerRunnerViewController actions
- 
                  
                  Scanning library requested authorization for Camera access from the user, but the user declined it. This case means scanning cannot be performed, because accessing camera images is now allowed. In this callback you have the chance to handle this case and present some kind of a message to the user on top of scanningViewController. DeclarationObjective-C - (void)recognizerRunnerViewControllerUnauthorizedCamera: (nonnull UIViewController<MBCRecognizerRunnerViewController> *) recognizerRunnerViewController;Swift func recognizerRunnerViewControllerUnauthorizedCamera(_ recognizerRunnerViewController: Any!)ParametersrecognizerRunnerViewControllerScanning view controller which was responsible for scanning 
- 
                  
                  Scanning library found an error. The error object is returned and contains description of the error, in a specified language. Do your error handling here. Currently, only one situation can result with this callback being called: - Using camera session resulted with AVCaptureSessionRuntimeErrorNotification notification
 The best way to handle this is to Log the error (GA, Crashlytics, Flurry) and let the user continue using the app. DeclarationObjective-C - (void)recognizerRunnerViewController: (nonnull UIViewController<MBCRecognizerRunnerViewController> *) recognizerRunnerViewController didFindError:(nonnull NSError *)error;Swift func recognizerRunnerViewController(_ recognizerRunnerViewController: Any!, didFindError error: any Error)ParametersrecognizerRunnerViewControllerScanning view controller which was responsible for scanning errorError object describing the error 
- 
                  
                  Scanning library was closed, usually by the user pressing close button and cancelling the scan DeclarationObjective-C - (void)recognizerRunnerViewControllerDidClose: (nonnull UIViewController<MBCRecognizerRunnerViewController> *) recognizerRunnerViewController;Swift func recognizerRunnerViewControllerDidClose(_ recognizerRunnerViewController: Any!)ParametersrecognizerRunnerViewControllerScanning view controller responsible for scanning 
- 
                  
                  Called when Scanning library will display help. This can happen when the user presses help button on scanning UI, or on first run of the application DeclarationObjective-C - (void)recognizerRunnerViewControllerWillPresentHelp: (nonnull UIViewController<MBCRecognizerRunnerViewController> *) recognizerRunnerViewController;Swift func recognizerRunnerViewControllerWillPresentHelp(_ recognizerRunnerViewController: Any!)ParametersrecognizerRunnerViewControllerrecognizerRunnerViewController Recognizer runner view controller responsible for scanning 
- 
                  
                  Called when Scanning library is resuming scanning. DeclarationObjective-C - (void)recognizerRunnerViewControllerDidResumeScanning: (nonnull UIViewController<MBCRecognizerRunnerViewController> *) recognizerRunnerViewController;Swift func recognizerRunnerViewControllerDidResumeScanning(_ recognizerRunnerViewController: Any!)ParametersrecognizerRunnerViewControllerrecognizerRunnerViewController Recognizer runner view controller responsible for scanning 
- 
                  
                  Called when Scanning library is stopped scanning. DeclarationObjective-C - (void)recognizerRunnerViewControllerDidStopScanning: (nonnull UIViewController<MBCRecognizerRunnerViewController> *) recognizerRunnerViewController;Swift func recognizerRunnerViewControllerDidStopScanning(_ recognizerRunnerViewController: Any!)ParametersrecognizerRunnerViewControllerrecognizerRunnerViewController Recognizer runner view controller responsible for scanning 
- 
                  
                  Called when Scanning library will turn on/off torch. DeclarationObjective-C - (void)recognizerRunnerViewController: (nonnull UIViewController<MBCRecognizerRunnerViewController> *) recognizerRunnerViewController willSetTorch:(BOOL)isTorchOn;Swift optional func recognizerRunnerViewController(_ recognizerRunnerViewController: Any!, willSetTorch isTorchOn: Bool)ParametersrecognizerRunnerViewControllerrecognizerRunnerViewController Recognizer runner view controller responsible for scanning isTorchOnisTorchOn Returns YES if torch mode was set successfully, otherwise NO. 
 View on GitHub
            View on GitHub
          