Inherits from: | UIImagePickerControllerDelegate |
---|
This protocol must be implemented by the readerDelegate provided to a ZBarReaderViewController or ZBarReaderController. It is used to notify the delegate of new decode results, when an image fails to decode, or when the user dismisses the reader with the built-in controls.
- - (void) imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*)info
This inherited delegate method is called when a barcode is successfully decoded. The decoded symbols are available from the dictionary as a ZBarSymbolSet using the ZBarReaderControllerResults key. The image from which the barcodes were scanned is available using the UIImagePickerControllerOriginalImage key. No other keys are guaranteed to be valid.
Note
The picker parameter will be the reader controller instance that read the barcodes - not necessarily a UIImagePickerController instance. You should cast it to the correct type for anything other than basic view controller access.
Picker : The reader controller that scanned the barcode(s). Info : A dictionary containing the image and decode results.
- - (void) imagePickerControllerDidCancel:(UIImagePickerController*)picker
Called when the user taps the “Cancel” button provided by the built-in controls (when showsZBarControls=YES). The default implementation dismisses the reader. If this method is implemented, it should do the same.
Note
The picker parameter will be the reader controller instance that read the barcodes - not necessarily a UIImagePickerController instance. You should cast it to the correct type for anything other than basic view controller access.
Picker : The reader controller that scanned the barcode(s).
- - (void) readerControllerDidFailToRead:(ZBarReaderController*)reader withRetry:(BOOL)retry
Called when an image, manually captured or selected from the photo library, is scanned and no barcodes were detected.
If the retry parameter is NO, the controller must be dismissed before this method returns. Otherwise, another scan may be attempted without re-presenting the controller.
If the showsHelpOnFail is YES and retry is YES, the integrated help viewer will already be presenting.
If this method is not implemented, the controller will be dismissed iff retry is NO.
Reader : The ZBarReaderController that scanned the barcode(s). Retry : Whether another scan may be attempted.