I wrote this code for my app that uses the camera to scan barcodes:
[captureMetadataOutput setMetadataObjectTypes:[NSArray arrayWithObject:AVMetadataObjectTypeCode128Code/\*AVMetadataObjectTypeCode39Code\*/]];
I would like to know how it is possible to write the fact that the setMetadataObjectTypes
can handle two types of barcode: the barcodes code39 and code128?
Okay, I think I finally found the good way to write it :
[captureMetadataOutput
setMetadataObjectTypes:
@[AVMetadataObjectTypeCode128Code, AVMetadataObjectTypeCode39Code]
];
or
[captureMetadataOutput
setMetadataObjectTypes:
[NSArray arrayWithObjects:
AVMetadataObjectTypeCode128Code,
AVMetadataObjectTypeCode39Code,
nil]];
Hope it helps.