在我正在使用的应用程序中ZBarReader
,我可以检测QRCode
并BarCode
使用代码
ZBarReaderViewController *reader = [ZBarReaderViewController new];
reader.readerDelegate = self;
reader.supportedOrientationsMask = ZBarOrientationMaskAll;
ZBarImageScanner *scanner = reader.scanner;
// TODO: (optional) additional reader configuration here
// EXAMPLE: disable rarely used I2/5 to improve performance
[scanner setSymbology:0 config:ZBAR_CFG_ENABLE to:0];
[scanner setSymbology: ZBAR_QRCODE
config: ZBAR_CFG_ENABLE
to: 1];
reader.tracksSymbols=YES;
reader.readerView.zoom=1.0;
// present and release the controller
[self presentModalViewController: reader
animated: YES];
[reader release];
但是只有当我让我的相机离条形码更近时它才会检测到代码,当我让我的相机离条形码有点远时它不会检测到即使我的相机离条形码很远,是否有任何属性可以非常快速地扫描代码..