MBCustomOverlayViewController

Objective-C


@interface MBCustomOverlayViewController : MBOverlayViewController

Swift

class MBCustomOverlayViewController : MBOverlayViewController

Custom Overlay View Controller is an abstract class for all custom overlay views placed on top View Controller. It’s responsibility is to provide meaningful and useful interface for the user to interact with.

  • Convenience initializer used for use cases when overlay view controller is instantiated from storyboard. It creates default MBCameraSettings and empty MBRecognizerCollection. To add recognizers after this initializer is used, please use reconfigureRecognizers:.

    Declaration

    Objective-C

    - (nonnull instancetype)init;

    Swift

    convenience init()
  • Scanning region Defines a portion of the screen in which the scanning will be performed. Given as a CGRect with unit coordinating system:

    Warning

    Should only be set AFTER RecognizerRunnerViewController has been instantiated with this CustomOverlayViewController, or else it will not have any effect.

    @example CGRectMake(0.2f, 0.5f, 0.4f, 0.3f) defines a portion of the screen which starts at 20% from the left border 50% from the top covers 40% of screen width and 30% of screen heeight

    Declaration

    Objective-C

    @property (nonatomic) CGRect scanningRegion;

    Swift

    var scanningRegion: CGRect { get set }
  • If YES, Overlay View Controller will be autorotated independently of ScanningViewController.

    Default: NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL autorotateOverlay;

    Swift

    var autorotateOverlay: Bool { get set }
  • If YES, default camera overlay will display Status bar. Usually, if camera is displayed inside Navigation View Controler, this is reasonable to set to YES.

    Default: NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL showStatusBar;

    Swift

    var showStatusBar: Bool { get set }
  • Default: UIInterfaceOrientationMaskPortrait

    Declaration

    Objective-C

    @property (nonatomic) UIInterfaceOrientationMask supportedOrientations;

    Swift

    var supportedOrientations: UIInterfaceOrientationMask { get set }
  • Reconfigures current recognizer collection to new recognizer collection. Use this method to reconfigure what you wish to scan.

    Declaration

    Objective-C

    - (void)reconfigureRecognizers:
        (nonnull MBRecognizerCollection *)recognizerCollection;

    Swift

    func reconfigureRecognizers(_ recognizerCollection: MBRecognizerCollection)