title: iOS : Zxing QR Code Reader in ipad not working in landscape orientation
body: <p>I am working on a <strong>landscape only</strong> iPad app and trying to integrate <a href="https://code.google.com/p/zxing/" rel="nofollow noreferrer">Zxing QR Code Scanner library</a> to the project. I am able to successfully integrate the library, and run without any compiler errors.</p>
  
  <h2>Issues</h2>
  
  <ol>
  <li>Even though my application is landscape, the Zxing camera view is
  showing as portrait.</li>
  <li>I am not able to scan using the library. I don't know whether camera
  layer showing in different orientation is the reason for it.</li>
  </ol>
  
  <h2>My project setup</h2>
  
  <ol>
  <li>iPad landscape only application</li>
  <li>target sdk        : <strong>iOS 6.1</strong></li>
  <li>deployment target : <strong>iOS 6.0 or above</strong></li>
  <li>zxing version     : <strong>2.1</strong></li>
  <li>testing on        : <strong>iPad 2, iOS 6.1</strong></li>
  </ol>
  
  <h2>My code</h2>
  
  <p>Well, code is simple, I am just calling <code>ZxingWidgetController</code> from my <code>HomeViewController</code> and implemented the delegate methods.. Delegates never getting fired.</p>
  
  <h3>HomeViewController.h</h3>
  
  <pre><code>@interface HomeViewController : UIViewController&lt;ZXingDelegate&gt;{
  }
  @end
  </code></pre>
  
  <h3>HomeViewController.m</h3>
  
  <pre><code>-(void) openCameraScanner{
      ZXingWidgetController *ctrller       =   [[ZXingWidgetController alloc] 
                                initWithDelegate:self showCancel:YES OneDMode:NO];
      ctrller.delegate                     = self;
      [self presentViewController:ctrller animated:YES completion:nil];
  }
  
  
  - (void)zxingController:(ZXingWidgetController *)controller 
                               didScanResult:(NSString *)reslt{
      [self showDismissiveAlertWithMessage:[NSString 
                       stringWithFormat:@"qr code read is : %@ ", reslt]];
  }
  
  - (void)zxingControllerDidCancel:(ZXingWidgetController *)controller{
      [self showDismissiveAlertWithMessage:@"Failed to read qr code"];
  }
  </code></pre>
  
  <p>Well, if my question is not clear enough, this is a scaled down version of my landscape app with a portrait looking Zxing.. </p>
  
  <p><img src="https://i.stack.imgur.com/JpG9k.png" alt="enter image description here"></p>