MBOverlayViewController


@interface MBOverlayViewController : UIViewController

Overlay View Controller is an abstract class for all overlay views placed on top View Controller.

It’s responsibility is to provide meaningful and useful interface for the user to interact with.

Typical actions which need to be allowed to the user are:

  • intuitive and meaniningful way to guide the user through scanning process. This is usually done by presenting a viewfinder in which the user need to place the scanned object
  • a way to cancel the scanining, typically with a cancel or back button
  • a way to power on and off the light (i.e. torch) button
  • Undocumented

    Declaration

    Objective-C

    MB_INIT_UNAVAILABLE
  • Overlay View’s delegate object. Responsible for sending messages to PhotoPay’s Camera View Controller

    Declaration

    Objective-C

    @property (readwrite, nonatomic)
        UIViewController<MBOverlayContainerViewController>
            *_Nullable recognizerRunnerViewController;

    Swift

    weak var recognizerRunnerViewController: (UIViewController & MBOverlayContainerViewController)? { get set }
  • Label which is displayed on screen when camera is paused, but still exists on the screen.

    This happens in split view and slide over modes in iOS 9.

    The view is centered on screen and displayed with a 0.4s fade in animation. It’s dismissed with 0.4s fade out animation.

    Default: UILabel *cameraPausedLabel = [[UILabel alloc] init]; cameraPausedLabel.text = @Camera paused; cameraPausedLabel.font = [UIFont systemFontOfSize:24.f]; cameraPausedLabel.textColor = [UIColor whiteColor]; cameraPausedLabel.layer.shadowRadius = 5.0f; cameraPausedLabel.layer.shadowOffset = CGSizeMake(1.0, 1.0); cameraPausedLabel.layer.shadowOpacity = 1.0f; cameraPausedLabel.layer.shadowColor = [UIColor blackColor].CGColor; [cameraPausedLabel sizeToFit];

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) UIView *cameraPausedView;

    Swift

    var cameraPausedView: UIView? { get set }