search

Home  >  Q&A  >  body text

iOS ZBarReaderView如何实现强制聚焦,提高聚焦度,有相关的方法和属性吗

如同ZBarViewController有相关方法:
ZBarReaderViewController *reader = [ZBarReaderViewController new];

reader.readerDelegate = self;
reader.videoQuality = UIImagePickerControllerQualityTypeHigh;
reader.supportedOrientationsMask = ZBarOrientationMaskAll;
ZBarImageScanner *scanner = reader.scanner;
[scanner setSymbology:ZBAR_I25 config:ZBAR_CFG_ENABLE to:1];

reader.showsZBarControls =NO;
[self setOverlayPickerView:reader];
[self presentViewController:reader animated:YES completion:nil];

ZBarReaderView有相关的提高聚焦的方法的吗?现在ZBarReaderView在有些机型上很难扫出小型的条形码

高洛峰高洛峰2772 days ago686

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-04-17 17:24:17

    There is an attribute in ZBarReaderView which is AVCaptureSession. Change readonly to strong, import <AVFoundation/AVFoundation.h> in the file that calls ZBarReaderView, and then set it like this [_readerView.session setSessionPreset:AVCaptureSessionPresetHigh]; to scan small barcodes. That's pretty quick.

    reply
    0
  • Cancelreply