Note that there are some explanatory texts on larger screens.

plurals
  1. POAutorotation and multiple view controllers
    text
    copied!<p>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.</p> <p>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? </p> <p>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?</p> <p>EDIT: The accepted answer for this question seems to indicate the exact problem I'm facing: <a href="https://stackoverflow.com/questions/548142/uiviewcontroller-rotate-methods">UIViewController rotate methods</a></p> <p>EDIT 2: Another question that confirms only the "primary" view controller will receive the rotate events. Is it really the case that I need to put all my code into one view controller that has multiple views? <a href="https://stackoverflow.com/questions/2423858/multiple-view-controllers-on-screen-at-once">Multiple view controllers on screen at once?</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload