title: IOS : Video recording using avcam in landscape mode?
body: <p>My app is locked to portrait mode in the General -> Device orientation setting.</p>
  
  <p>I'm using AVCam to record the videos and i would like to record both in landscape and portrait video.</p>
  
  <p>I have tried with the below approach and also i have tried the few more approaches  but that doesn't help : </p>
  
  <p>When the device is rotated , i have set the preview layer orientation and start recorded the video.</p>
  
  <pre><code>[[(AVCaptureVideoPreviewLayer *)[[self previewView] layer] connection] setVideoOrientation:(AVCaptureVideoOrientation)toInterfaceOrientation];
  </code></pre>