MBIScanElement


@interface MBIScanElement : NSObject

The easiest way to UI for Ocr scanning is by specifying the MBIScanElements.

Each MBIScanElement knows

  • it’s name and Parser factory - which are needed for actual parsing
  • localized Title and Tooltip - which are needed in the UI
  • scanning region - percentage of screen used in scanning the element
  • information whether the element was scanned or edited
  • actual value of the element, used in business logic after the scannig
  • Designated initializer, defines the unique identifier for this canned element, and Parser factory for it.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithIdentifier:(nonnull NSString *)identifier
                                        parser:(nonnull MBIParser *)parser;

    Swift

    init(identifier: String, parser: MBIParser)

    Parameters

    identifier

    unique ID for this scan element

    parser

    parser which knows how to scan this element

    Return Value

    initialized instance

  • Unavailable

    Undocumented

    Declaration

    Objective-C

    MB_INIT_UNAVAILABLE
  • Unique name of the element

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) NSString *_Nonnull identifier;

    Swift

    var identifier: String { get }
  • Parser object which is reponsible scanning the text.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) MBIParser *_Nonnull parser;

    Swift

    var parser: MBIParser { get }
  • Localized title (used in the Pivot control)

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nonnull localizedTitle;

    Swift

    var localizedTitle: String { get set }
  • Localized tooltip (used in the tooltip label above the viewfinder)

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nonnull localizedTooltip;

    Swift

    var localizedTooltip: String { get set }
  • Keyboard type used when editing

    Declaration

    Objective-C

    @property (nonatomic) UIKeyboardType keyboardType;

    Swift

    var keyboardType: UIKeyboardType { get set }
  • Localized initial UITextField text (used in field segment scanning text fields)

    Declaration

    Objective-C

    @property (nonatomic) NSString *_Nonnull localizedTextfieldText;

    Swift

    var localizedTextfieldText: String { get set }
  • YES if the value was scanned, NO otherwise. Note: Both scanned and edited cannot be set to YES.

    Declaration

    Objective-C

    @property (nonatomic) BOOL scanned;

    Swift

    var scanned: Bool { get set }
  • YES if the value was manually edited, NO otherwise. Note: Both scanned and edited cannot be set to YES.

    Declaration

    Objective-C

    @property (nonatomic) BOOL edited;

    Swift

    var edited: Bool { get set }
  • Actual value for this element

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nonnull value;

    Swift

    var value: String { get set }
  • Width of scanning region used in UI. Values are between 0.0 and 1.0 where 1.0 is whole screen width and 0.5 is half width.

    Declaration

    Objective-C

    @property (nonatomic) float scanningRegionWidth;

    Swift

    var scanningRegionWidth: Float { get set }
  • Height of scanning region used in UI. Values are between 0.0 and 1.0 where 1.0 is whole screen height and 0.5 is half height.

    Declaration

    Objective-C

    @property (nonatomic) float scanningRegionHeight;

    Swift

    var scanningRegionHeight: Float { get set }
  • Image of the scanned element.

    Images will NOT be outputted unless outputSuccessfulImages is enabled on MBIFieldByFieldOverlaySettings.

    Declaration

    Objective-C

    @property (nonatomic) MBIImage *_Nonnull successfulScanImage;

    Swift

    var successfulScanImage: MBIImage { get set }