iPhone Landscape FAQ and Solutions

Posted by Johannes Rudolph on Stack Overflow See other posts from Stack Overflow or by Johannes Rudolph
Published on 2010-06-01T21:08:27Z Indexed on 2010/06/02 8:43 UTC
Read the original article Hit count: 431

Filed under:
|
|
|

There has been a lot of confusion and a set of corresponding set of questions here on SO how iPhone applications with proper handling for Landscape/Portrait mode autorotation can be implemented. It is especially difficult to implement such an application when starting in landscape mode is desired. The most common observed effect are scrambled layouts and areas of the screen where touches are no longer recognized.

A simple search for questions tagged iphone and landscape reveals these issues, which occur under certain scenarios:

A set of different solutions have been presented, some of them including completely custom animation via CoreGraphics, while others build on the observation that the first view controller loaded from the main nib is always displayed correct.

I have spent a significant amount of time investigating this issue and finally found a solution that is not only a partial solution but should work under all these circumstances. It is my intend with this CW post to provide sort of a FAQ for others having issues with UIViewControllers in Landscape mode.

Please provide feedback and help improve the quality of this Post by incorporating any related observations. Feel free to edit and post other/better answers if you know of any.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uiviewcontroller