|
@ -369,12 +369,15 @@ BOOL base64;
|
369
|
369
|
CIDetector *detector = [CIDetector detectorOfType:CIDetectorTypeQRCode
|
370
|
370
|
context:nil
|
371
|
371
|
options:@{CIDetectorAccuracy : CIDetectorAccuracyHigh}];
|
372
|
|
NSArray <CIQRCodeFeature *>*features = [detector featuresInImage:detectImage options:nil];
|
|
372
|
NSArray <CIFeature *>*features = [detector featuresInImage:detectImage options:nil];
|
373
|
373
|
__block NSMutableArray *detetorResults = [NSMutableArray arrayWithCapacity:features.count];
|
374
|
374
|
if (features && features.count) {
|
375
|
|
[features enumerateObjectsUsingBlock:^(CIQRCodeFeature * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
376
|
|
if ([IPUStringUtility isValiteString:obj.messageString]) {
|
377
|
|
[detetorResults addObject:obj.messageString];
|
|
375
|
[features enumerateObjectsUsingBlock:^(CIFeature * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
|
376
|
if ([obj.type isEqualToString:CIFeatureTypeQRCode]) {
|
|
377
|
CIQRCodeFeature *feature = (CIQRCodeFeature *)obj;
|
|
378
|
if ([IPUStringUtility isValiteString:feature.messageString]) {
|
|
379
|
[detetorResults addObject:feature.messageString];
|
|
380
|
}
|
378
|
381
|
}
|
379
|
382
|
}];
|
380
|
383
|
}
|