VLDOCRViewControllerDelegate Protocol Reference

Conforms to NSObject
Declared in VLDOCRViewController.h

Overview

The VLDOCRViewControllerDelegate protocol provides callbacks for when the user has finished with the VLDOCRViewController.

– ocrViewControllerDidCancel: required method

The user pressed the cancel button.

- (void)ocrViewControllerDidCancel:(VLDOCRViewController *_Nonnull)viewController

Parameters

viewController

the instance of the view controller where the cancel occurred.

Discussion

The user pressed the cancel button.

Declared In

VLDOCRViewController.h

– ocrViewControllerWasDeniedCameraAuthorization: required method

The user did not grant access to the camera so OCR can’t be performed.

- (void)ocrViewControllerWasDeniedCameraAuthorization:(VLDOCRViewController *_Nonnull)viewController

Parameters

viewController

the instance of the view controller where the action occurred.

Discussion

The user did not grant access to the camera so OCR can’t be performed.

Declared In

VLDOCRViewController.h

– ocrViewController:didCompleteReading:image:metadata: required method

The OCR reading was successful.

- (void)ocrViewController:(VLDOCRViewController *_Nonnull)viewController didCompleteReading:(VLDRecord *_Nullable)record image:(UIImage *_Nullable)image metadata:(NSDictionary *_Nullable)metadata

Parameters

viewController

the VLDOCRViewController that got the reading, passed back to simplify dismissal.

record

the reading that was just taken.

image

the final image of the screen used to determine the reading.

metadata

A dictionary containing additional metadata from the OCR process. The dictionary should contain the final full screen camera preview processed by the OCR engine, identified with the key kVLDOCRMetadataFinalPreviewKey. The dictionary will also contain the frame of the image inside the camera preview identified by the key kVLDOCRMetadataImageFrameKey. The coordinate space of this frame will be the screen’s coordinate space.

Discussion

The OCR reading was successful.

Declared In

VLDOCRViewController.h