1

https://github.com/phonegap/phonegap-plugins/tree/master/iOS/BarcodeScannerの PhoneGap 1.7.0 と Zxing Barcode Scanner を使用して、iPad に Zxing Barcode Scanner を実装しました。ただし、向きは縦のみです。このコードを修正してランドスケープに変更したい

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

そしてこのコードも

if (interfaceOrientation == UIInterfaceOrientationPortrait) return YES;

CDVBarcodeScanner.mm で、Portrait の値を LandscapeRight に変更します。私の問題は、ビデオが全画面表示ではなく、右側に黒い部分があることです。また、横向きモードでも横向きではなく縦向きの場合にのみバーコードをスキャンすると成功します。

ランドスケープモードを完璧にする解決策はありますか?

4

1 に答える 1

4

これを削除

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

zxing-all-in-one.cppファイル

于 2012-06-12T09:40:57.917 に答える