MBIBarcodeOverlayViewControllerDelegate

@protocol MBIBarcodeOverlayViewControllerDelegate <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:

    • there may be 0, 1, or more than one scanning results.
    • each scanning result belongs to a common MBIRecognizerResult type
    • handle different types differently

    Declaration

    Objective-C

    - (void)
        barcodeOverlayViewControllerDidFinishScanning:
            (nonnull MBIBarcodeOverlayViewController *)barcodeOverlayViewController
                                                state:
                                                    (MBIRecognizerResultState)state;

    Swift

    func barcodeOverlayViewControllerDidFinishScanning(_ barcodeOverlayViewController: MBIBarcodeOverlayViewController, state: MBIRecognizerResultState)

    Parameters

    barcodeOverlayViewController

    barcodeOverlayViewController 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)barcodeOverlayViewControllerDidTapClose:
        (nonnull MBIBarcodeOverlayViewController *)barcodeOverlayViewController;

    Swift

    func barcodeOverlayViewControllerDidTapClose(_ barcodeOverlayViewController: MBIBarcodeOverlayViewController)

    Parameters

    barcodeOverlayViewController

    Scanning view controller responsible for scanning