Zxing条码扫描器PhoneGap插件iOS横向模式 [英] Zxing Barcode Scanner PhoneGap Plugin iOS landscape mode

查看:283
本文介绍了Zxing条码扫描器PhoneGap插件iOS横向模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用PhoneGap 1.7.0和Zxing Barcode Scanner从ipad实现Zxing条形码扫描器从 https://github.com/phonegap/phonegap-plugins/tree/master/iOS/BarcodeScanner 。但方向只是肖像。我想通过修改此代码将其更改为横向。

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. But the orientation is portrait only. I want to change it to landscape by modify this code

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

和此代码

if (interfaceOrientation == UIInterfaceOrientationPortrait) return YES;

并将Portrait的值更改为LandscapeRight。
我的问题是视频不是全屏,右边有黑色部分。

in CDVBarcodeScanner.mm and change the value of Portrait to 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?

推荐答案

删除此

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


$ b b

在zxing-all-in-one.cpp文件

on zxing-all-in-one.cpp file

这篇关于Zxing条码扫描器PhoneGap插件iOS横向模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆