CIDetector与CIDetectorTypeQRCode工作在iPad上,但不能在iPhone和iPod



当我尝试使用CIDetector读取iPhone或iPod上的QR码时,检测器总是返回nil:

NSDictionary *detectorOptions = @{@"CIDetectorAccuracy": @"CIDetectorAccuracyHigh"};
CIDetector * detector = [CIDetector  detectorOfType:CIDetectorTypeQRCode context:nil options:detectorOptions];

在iPad上运行此代码有效。所有设备都在iOS 9上,使用Xcode 7.0.1

其他检测器工作正常,如人脸检测成功:

detector = [CIDetector detectorOfType:CIDetectorTypeFace context:nil options:detectorOptions];

是否有一个额外的设置/库来获得QRCode检测器在iPhone/iPod上工作?

是的,根据我的测试,它不适合触摸。但在iPhone和iPad上运行良好

相关内容

最新更新