当我尝试使用CIDetector
读取 iPhone 或 iPod 上的二维码时,检测器总是返回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 上工作?