OCR

VLDOCRController is the primary interface for getting records from a peripheral via OCR. The live results and final record are given to the VLDOCRController’s delegate object (VLDOCRControllerDelegate).

VLDOCRController is initialized with a VLDOCRPeripheral object. A VLDOCRPeripheral object can be obtained by calling [VLDOCRPeripheral supportedPeripherals].

When an instance of VLDOCRController is initialized it will immediately turn on the camera for the current device. The camera preview can be accessed with the previewLayer property. VLDOCRController needs to be configured with the configureForPreviewLayerSize: method. You need to call this method when VLDOCRController is initialized and pass in the size of the preview layer (generally the full size of the screen). This will allow the library to set the overlayFrame property to the correct size. overlayFrame should then be used to set the frame of the overlayImage from the peripheral. This is required so that the user is able to position the camera so that the peripheral is in the proper place to be processed for OCR. Note: you will need to call configureForPreviewLayerSize: if the size of the preview layer changes, it is recommended to call this method from the viewDidLayoutSubviews callback in your view controller.

For a complete example of this implemented see the Vitalsnap example project.