I have a preview layer which shows the camera preview, using AVFoundation. Now I want to start my app such that everything is in landscape mode. How do I do that for the preview layer?
setorientation:
method is deprecated for iOS 6 so I don't want to use that.
The setVideoOrientation
method of AVCaptureConnection
changes the actual way the images are captured but the preview orientation still remains the same.