目前我正在尝试为iOS开发多个QR码阅读器。 我正在使用ZXing和ZXQRCodeMultiReader来完成我的工作。
我所做的只是在ZXCapture中添加ZXMultipleBarcodeReader协议并在AVCaptureVideoDataOutputSampleBufferDelegate中添加此代码:
NSArray* hasil ;
hasil = [self.readers decodeMultiple:bitmap hints:self.hints error:&error];
int arrayCount = [hasil count];
NSLog(@"count = %d\n",arrayCount);
for (int i=0; i<arrayCount; i++) {
ZXResult * result = [hasil objectAtIndex:i];
if (result) {
dispatch_async(dispatch_get_main_queue(), ^{
[self.delegate captureResult:self result:result];
});
}
}
计数结果为0,而不是读取多个QR码。 有没有人对解决方案有一些问题。
谢谢