简体   繁体   English

Zxing条码扫描器PhoneGap插件iOS横向模式

[英]Zxing Barcode Scanner PhoneGap Plugin iOS landscape mode

I have implement Zxing Barcode Scanner in ipad using PhoneGap 1.7.0 and Zxing Barcode Scanner from https://github.com/phonegap/phonegap-plugins/tree/master/iOS/BarcodeScanner . 我使用PhoneGap 1.7.0和Zxing条码扫描器在ipad中实现了Zxing条码扫描器,来自https://github.com/phonegap/phonegap-plugins/tree/master/iOS/BarcodeScanner But the orientation is portrait only. 但是方向只是肖像。 I want to change it to landscape by modify this code 我想通过修改此代码将其更改为横向

if ([previewLayer isOrientationSupported]) {
    [previewLayer setOrientation:AVCaptureVideoOrientationPortrait];
}

and this code too 这个代码也是

if (interfaceOrientation == UIInterfaceOrientationPortrait) return YES;

in CDVBarcodeScanner.mm and change the value of Portrait to LandscapeRight. 在CDVBarcodeScanner.mm中,将Portrait的值更改为LandscapeRight。 My problem is video not full screen, there has black portion in right. 我的问题是视频不全屏,右边有黑色部分。 Also when scan barcode only success when portrait not landscape even in landscape mode. 此外,当扫描条形码仅成功时,即使在横向模式下,纵向也不是风景。

Is there any solution to make landscape mode perfect? 是否有任何解决方案使景观模式完美?

Delete this 删除它

if (result.empty() && hints.getTryHarder() && image->isRotateSupported()) {}

on zxing-all-in-one.cpp file 在zxing-all-in-one.cpp文件中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM