Custom Overlay UIImagePickerController Landscape mode issue - ios

I have a UIImagePickerController with custom overlay. When I open the camera in landscape orientation in iPhone, the camera view is not displayed properly. I don't want the camera view in landscape mode. I want the camera view only to be opened in portrait mode.
Can someone pls help me out on this?.
Thanks in advance.

Related

Dismissing imagePickerController while holding the device landscape style causes my app to rotate into landscape mode (but my app is portrait only)

I have a portrait and portrait upside-down app. I present an imagePickerController and it allows me to take pictures which can be either landscape or portrait. after taking a picture, the imagePicker verifies if I want to use the photo that was taken. If I hold my device 'sideways' (in a landscape fashion), the image picker view will dismiss like normal and my original view controller will be displayed, except it is in landscape mode (including the keyboard). This should be impossible because my app only supports portrait orientations.
Any ideas on how to keep my app in portrait mode so that the UI doesn't get messed up?
This is my app before I open the imagePicker:
This is the imagePicker right before I dismiss it. although this screenshot is in portrait mode, please imagine that I am holding the device SIDEWAYS (landscape style):
This is the resulting bugged out screen, that I would like to prevent:
I would first check Info.plist and confirm that the orientation is correct and does not contain any landscape options for either iphone or ipad:

Capture API from CosmicMind-Material: Camera preview not correct

When CaptureController is being push using navigation controller, camera preview is always portrait. When going to landscape it won't reflect the camera preview. But when it's just a "self.present" it's okay like the sample project. How can I manipulate when orientation is landscape and the camera preview is also landscape. Captured image have correct orientation, just the camera preview.
Lanscape but the camera preview orientaion is portait - Sample image attached:
link here
Solved! This line fix the issue:
(capture.preview.layer as! AVCaptureVideoPreviewLayer).connection.videoOrientation = videoOrientation
Just put it in the delegate function
func capture(capture: Capture, didChangeFrom previousVideoOrientation: AVCaptureVideoOrientation, to videoOrientation: AVCaptureVideoOrientation)

Auto rotate image to portrait when I take photo landscape in portrait mode objective-c

I take a image portrait but UIImageView show landscape. I want auto rotate image to portrait when I take photo landscape in portrait mode. Please see clip.
https://www.youtube.com/watch?v=S8RQ1yDKvFQ
Thank you!

UIImagePickerController landscape wrong orientation

I have a problem with UIImagePickerController on my iPad. it is presented as a modalView (presentViewController:).
All orientations are allowed and should work.
If I push a ViewController in Portrait mode on this VC (this is the main view of the App), go back to the Springboard, rotate the iPad to Landscape mode, reopen my App, There is a big black space on the screen.
However, the camera controls are well shown.
Has anyone already seen this kind of bug?
Thank you.
This is better with a screenshot

UIImagePickerController With Camera Option in landscape mode in iphone SDK

I'm going to use UIImagePickerController with source as a camera. by default when i'm capturing the image m able to take the picture in portrait mode. here the problem is that i'm not able to display the same view in landscape mode.
Is there any other way to open the camera in Landscape mode?
Thanks in advance.
First of all there is no way to open camera in Landscape mode So we have to customize views as per our need.
You have to add rotation transformation to picture which will match to landscape view. You can hard code it as ,
Blockquote
CGAffineTransformRotate(CGAffineTransformIdentity, 117.81)"
Blockquote

Resources