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

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:

Related

Binding data If we have different views for portrait and LandScape Mode

I have a complicated Screen. And my App supports both Landscape and Portrait mode. So I created two storyBoard for iPAD and iphone. Now How to bind the data if lets say user is in Portrait mode and he is filling some form. If he rotate his device and come to LandScape mode. How we can preserve and show that data in the LandScape View. Please help.

How to segue from landscape to portrait orientated view controllers

I'm working on an app that works only in landscape orientation but there's an option to access the photo roll and choose pictures to be used in the app.
This works only in portrait mode.
So I have have to work with 2 view controllers, one that needs to be in portrait mode only and the second that should always be in landscape mode. Does anyone knows how I can accomplish this in Swift?

Do you need a landscape iPad launch image for app thats just portrait

I have made me app so that device orientation is portrait only, however there it still has a place to put landscape launch image. Will I have to have one? If so can I just have a rotated version of the portrait one (i.e. this will be sideways if the device is held in a landscape manner)?
You don't need to have a landscape default image even if you do support landscape.
If you are only in portrait, then a single image will do.

iOS Orientation adapts to unapproved device orientation after Camera dismissed

I am currently writing an iOS app in which have the acceptable device orientations set to Landscape Right and Landscape Left, and in all of my view controllers, I’m returning only those two in the supportedInterfaceOrientations method.
However, if the user uses the in-app camera functionality (which is implemented via UIImagePickerController presented modally in full screen) and rotates the device to Portrait orientation to take a picture, the camera rotates to portrait mode (which is fine), and if the user clicks "Use Photo", when the modal view is dismissed, the view from which the camera was launched is somehow now in portrait mode (which is not fine).
After the camera view has been dismissed, the view controller from which it was launched has UIDeviceOrientationIsPortrait set to true. I am wondering how it ended up in this orientation, and how when a picture is taken, I can ensure that the presenting view controller remains in a landscape orientation. Any help is greatly appreciated!
I am currently writing an iOS app in which have the acceptable device
orientations set to Landscape Right and Landscape Left, and in all of
my view controllers, I’m returning only those two in the
supportedInterfaceOrientations method.
In iOS 6 and later, your app supports the interface orientations defined in your app’s Info.plist file
Have you tried setting it here? Then see if the problem still occurs.
Also, if this doesn't work, try setting the supportedInterfaceOrientations values in the viewWillAppear method of the ViewController that launched UIImagePicker?

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

Resources