Utility application template and autorotation; force flipside view to always display
Just what the post title says... I've created an application using the Utility template in order to handle two 'flippable' views. I'm not using Interface Builder at all but creating all of my interfaces by code.
I wish to handle device auto rotation but only for the main view, with the flipside view always displaying in portrait mode. If of any importance, my application has the status bar hidden and my flipside view is added through an UINavigationController (instead of using a UINavigationBar as supplied by the application template).
When implementing the shouldAutorotateToInterfaceOrientation method, it only works on the RootViewController. I tried not implementing it there, only on the main view controller but it doesn't work. So I implemented it on the RootViewController, and have conditioned its return value to the display of the flipside view. This way I can prevent the view to rotate itself when the flipside view is displayed.
This is half the solution to the problem, however. If I'm on the main view rotated to a landscape orientation and display the flipside view, it doesn't display properly. I've tried several methods to make it appear with a portrait orientation regardless of the physical orientation of the device with no luck. I've looked through several similar threads and haven't found an answer, so any help would be greatly appreciated.
Best regards,
|