Autorotation and multiple view controllers

Posted by alku83 on Stack Overflow See other posts from Stack Overflow or by alku83
Published on 2010-06-07T05:39:12Z Indexed on 2010/06/07 5:42 UTC
Read the original article Hit count: 388

Filed under:
|
|
|

I'm creating an iPad application which should only work in portrait and portait upsidedown modes. For performance reasons in my applicationDidFinishLaunching method I'm creating several viewControllers, and adding them to my main window as subviews. I then hide the ones I don't want to see straight away. There is no tab bar or navigation controller.

My problem is that only the first viewController seems to be receiving the rotate calls. I have verified this by swapping around the order in which I add the subviews to the main window and NSLog's. Is there some way I can force all the controllers to receive the calls?

Some of my views are designed to lay over the top of another view, but this behind view will not always be the same one - so it seems to make sense to have the overlay view in a separate view controller. Am I doing something fundamentally wrong, and that's why it's not behaving as I would expect?

EDIT: The accepted answer for this question seems to indicate the exact problem I'm facing: http://stackoverflow.com/questions/548142/uiviewcontroller-rotate-methods

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk