问题
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];
}
and this code too
if (interfaceOrientation == UIInterfaceOrientationPortrait) return YES;
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?
回答1:
Delete this
if (result.empty() && hints.getTryHarder() && image->isRotateSupported()) {}
on zxing-all-in-one.cpp file
来源:https://stackoverflow.com/questions/10945976/zxing-barcode-scanner-phonegap-plugin-ios-landscape-mode