The ScanView, through its delegate, also provides some useful info that you can hook into while the scan view is running. Set the
ALScanView 's delegate in order to be notified of these events:
@protocol ALScanViewDelegate <NSObject> @optional - (void)scanViewMotionExceededThreshold:(ALScanView *)scanView; - (void)scanView:(ALScanView *)scanView didReceiveNativeBarcodeResult:(ALScanResult *)scanResult; - (void)scanView:(ALScanView *)scanView updatedCutoutWithPluginID:(NSString *)pluginID frame:(CGRect)frame; @end
The following methods can be implemented to enhance your scanning experience:
scanViewMotionExceededThreshold: tells you when excessive motion has been detected while the scan view is displayed. You can use this to prompt the user to steady their hold on the mobile device while scanning.
scanView:updatedCutoutWithPluginID:frame:can be used to determine where the cutouts in the scan view are, and to respond accordingly (for instance, you may use this to add and position info overlays telling the users what they should be scanning with the cutouts).
scanView:didReceiveNativeBarcodeResult:can return any barcodes found on the scan view while it is running.