MBPScanResultView

Objective-C

@interface MBPScanResultView : UIView

Swift

class MBPScanResultView : UIView

View responsible for displaying scannng result

  • Text field which can be used to manually edit the text

    Declaration

    Objective-C

    @property (nonatomic) UITextField *textField;

    Swift

    @IBOutlet var textField: UITextField! { get set }
  • Animates the display of scan result view.

    Animation emerges from the point “point”, and moves to the frame specified by “bounds” and “center”. Animation duration is specified by animationDuration, and completion block by “completion”

    Declaration

    Objective-C

    - (void)animateShowFromViewCenter:(UIView *)startCenter
                              toFrame:(UIView *)end
                    animationDuration:(NSTimeInterval)animationDuration
                           completion:(void (^)(BOOL))completion;

    Swift

    func animateShow(fromViewCenter startCenter: UIView!, toFrame end: UIView!, animationDuration: TimeInterval) async -> Bool

    Parameters

    startCenter

    emerging point of the animation (center of given view)

    end

    final view frame of the aniamtion

    animationDuration

    duration of the animation

    completion

    completion block

  • Animates the hiding of the scan result view

    Declaration

    Objective-C

    - (void)animateHideToViewCenter:(UIView *)endCenter
                  animationDuration:(NSTimeInterval)animationDuration
                         completion:(void (^)(BOOL))completion;

    Swift

    func animateHide(toViewCenter endCenter: UIView!, animationDuration: TimeInterval) async -> Bool

    Parameters

    endCenter

    vanishing point of the animation (center of given view)

    animationDuration

    duration of the animation

    completion

    completion block

  • Used for easier instantiation from Nib file

    Declaration

    Objective-C

    + (instancetype)allocFromNibName:(NSString *)nibName;

    Swift

    class func alloc(fromNibName nibName: String!) -> Self!

    Parameters

    nibName

    Name of the nib file

    Return Value

    Scan result view instance