I am developing BarCode reader app in iOS 6,
I am using ZBar sdk
, i developed app using this Tutorial..
when i scans any barcode it scans only product of UPC
format, but it doesn't scans the product of any other format like EAN_13
or Code_128
etc..
Here is my code snippet,
- (IBAction) scanButtonTapped
{
ZBarReaderViewController *reader = [ZBarReaderViewController new];
reader.readerDelegate = self;
reader.supportedOrientationsMask = ZBarOrientationMaskAll;
ZBarImageScanner *scanner = reader.scanner;
[scanner setSymbology: ZBAR_I25
config: ZBAR_CFG_ENABLE
to: 0];
[self presentViewController:reader animated:YES completion:nil];
}
- (void) imagePickerController: (UIImagePickerController*) reader
didFinishPickingMediaWithInfo: (NSDictionary*) info
{
id<NSFastEnumeration> results =
[info objectForKey: ZBarReaderControllerResults];
ZBarSymbol *symbol = nil;
for(symbol in results)
break;
NSLog(@"symbol.data=%@",symbol.data);
[reader dismissViewControllerAnimated:YES completion:nil];
}
How to scan product of all type ? any idea ?