如何制作ZBarReaderViewController全屏

时间:2011-11-11 04:57:47

标签: objective-c ios barcode-scanner

我想全屏显示ZBarReaderViewController。 我使用这段代码:

_reader = [ZBarReaderViewController new];
_reader.readerDelegate = self;
_reader.videoQuality = UIImagePickerControllerQualityTypeHigh;
_reader.readerView.showsFPS = YES;
_reader.readerView.allowsPinchZoom = YES;
_reader.showsCameraControls = NO;
_reader.showsZBarControls = NO;
_reader.navigationController.navigationBarHidden = NO;
_reader.wantsFullScreenLayout = YES;
CGAffineTransform translate = CGAffineTransformMakeTranslation(0.0, 0.0);
_reader.cameraViewTransform = translate;        
CGAffineTransform scale = CGAffineTransformScale(translate, 1.5, 1.5);
_reader.cameraViewTransform = scale;
[_reader.scanner setSymbology: ZBAR_I25 config: ZBAR_CFG_ENABLE to: 0]; 
[self presentModalViewController:_reader animated:YES];

但结果阅读器视图未显示为我预期的全屏。 请帮我。 感谢。

1 个答案:

答案 0 :(得分:-1)

我假设你只在iPad上遇到这个问题?

我遇到了同样的问题,并设法通过使用最新的ZBarSDK测试版来修复它。请在此处查看我对类似问题的回答:zbarsdk ZBarReaderViewController - set full screen for ipad