Hi
I am trying to implement orientation awareness in my iPad app. (iOS 3.2). As far as I can understand something has changed from 2.x(which was the last time I did rotation) to 3.x.
My landscape and portrait views are very different so as the shouldAutorotateToInterfaceOrientation
is called I instantiate a new viewController and adds its view to the top controllers view.
Adding a new view to a viewController, I think, results in the shouldAutorotateToInterfaceOrientation
being called again, which instantiates my view controller again etc. until the whole thing crashes.
Is there a pattern for implementing the use of two different viewControllers, one for landscape and one for portrait?
I also foresee the problem that all child controllers must implement shouldAutorotateToInterfaceOrientation
, but I don't want them to rotate as I build the view to fit to a certain orientation, i.e. I have a landscape viewcontroller and a portrait viewcontroller so I actually don't want them to rotate, just to the topmost controller.
Will this become a problem if I get the above question solved?
Thanks for any help or advise given:)