Landscape Rotation with Action Sheet and Alert Views


As my first post I’d like to start by saying thanks for writing the book. I enjoyed the style and found the way you try to ensure the reader gets a deep understanding very helpful.

I am writing an app that is landscape only. I’ve used the instructions on P133-134. Most of the view is orientated in landscape as expected, however when I show an action sheet in the view controllers main view, it appears in portrait, despite all the other view components being in landscape. When showing alert views, they do show in landscape, but as they appear, they are rotating from portrait. I would expect the animation to all be in landscape.

Is there anything besides the Initial Interface Orientation in the plist file and the shouldAutoRotateInterfaceOrientation method of the view controller that could affect the orientation of the action sheet and alert views? Thanks.



I think I understand this now. I was showing the action sheet in the viewDidAppear method of my main view controller. Although my application was only supporting landscape, the view hiearchy didn’t actually adopt this orientation until it had briefly appeared in portrait. I could get the action sheet to show correctly by showing it in the didRotateFromInterfaceOrientation method of the view controller, which will only get called once at the initial rotation to landscape.

I think the significant thing with the action sheet is that they don’t respond to changes in orientation, where as alert and other views did.