iOS App starting in landscape mode on iPad - iphone

My App is designed to work on both portrait and landscape mode.
If the App is started on portrait mode, everything works as expected. And you can rotate to any other orientation without problems.
But if started in landscape mode, unexpected things happen.
First: about a third of the right display does not react to touches. Any buttons on this side are not working.
Second: Change orientation to portrait mode will not update the screen correctly. The page layout remains the same as in landscape mode, but is rotated and centered. The right and left sides are cut off.
The problem seems to occur only on some user-devices. On my devices and on simulator everything is in order.

Related

Half black screen is visible when device orientation changes from portrait to landscape

I'm using InfiniteCollectionView class, Once I change the device Orientation from portrait to landscape, half the screen looks black for a second
I have also tried the viewWillTransition function by doing the same but I didn't get success

iAd content always displayed in portrait using landscape only app

My current app is landscape only.
I display an iAd banner in bottom area of screen. It's showing correctly in landscape mode.
However tapping it, the ad content screen is sliding in from the right when holding landscape right and from the left when holding landscape left. The ad content screen is always displayed in portrait mode. Is there no way to display ad content screen in landscape mode?
Using iOS 6+.
This is similar but seems to deal with acceleration etc. My app does not rotate except between the two landscape modes. (and actually it seems that that topic is about the banner itself, not the opening ad content screen)
Landscape iAd is showing the portrait graphic in iOS6?
Edit: Apple's iAdSuite seems to do the same. The apps support portrait modes too, but in landscape mode, tapping on an landscape ad the opening ad content is in landscape mode.
http://developer.apple.com/library/ios/samplecode/iAdSuite/Introduction/Intro.html#//apple_ref/doc/uid/DTS40010198
It looks like this is by design(?) hmmm... not pretty
I can't confirm it but it just seems that there is no landscape ad content.

On iOS, if the plist says "Landscape Left", and shouldAutorotateToInterfaceOrientation says LandscapeRight, the app can start with Portrait mode?

I wonder why, if a Single View app is created brand new for iPad, and clicking on the Project, I chose in "Support Device Orientation" to be Landscape Left, and in ViewController's shouldAutorotateToInterfaceOrientation, I return YES only when it is UIInterfaceOrientationLandscapeRight, then the app can actually start up as Portrait mode?
I more expected the app to start up as Landscape Left and be able to rotate to Landscape Right and then won't be able to rotate to any other orientation. I wonder what caused the above behavior?

Forcing a UIVIew to lay itself out for the current device orientation

I've been working on this for days and can't crack it. The sequence of events is:
In landscape (let's just say right), the user hits an "edit" button.
A portrait only modal interface slides in. Its shouldAutorotateToInterfaceOrientation returns yes only for portrait.
The device becomes convinced it is in portrait mode.
Problem 1: If the user dismisses the interface without having actually rotated to portrait mode, the device reports that is in landscape right orientation (which it is), but the interface is laid out in portrait orientation.
Problem 2: If the user rotates to portrait, the interface does not get laid out again.
Problem 3: (And this one is weird) Rotating back to the same landscape orientation (right) where the edit button was pressed causes the status bar to return to landscape, but nothing else changes. All my stuff remains laid out in portrait mode. Rotating to the other (left) landscape orientation works perfect.
I need some way to force the layout engine to redo the layout for the orientation the device is actually in.
UIView - layoutSubviews, - setNeedsLayout, and -layoutIfNeeded don't have any effect.
Thanks for any help.
Do what iBooks (2.x) does and force the interface orientation to portrait with
+ (void)attemptRotationToDeviceOrientation. This way, you nip the problem in the bud at step one.

Portrait Orientation is losing touch input

I'm making a universal apps with auto rotation, and I'm only using landscape left and right. When I rotate the iPhone to the portrait down position, I can see what looks like a window underneath the app rotating and I no longer get touch events.
In all the shouldAutoRotate functions I'm making sure only return true for landscape, and the info.plist only allows landscape left and right.
Sounds like your view is not correctly resizing after an orientation change. Easy way to check this is to set the background color to something non-white.