Search code examples
landscapetabbarcontrolleraddsubview

iphone sdk: how to correctly switch controller


I am struggling with my app for a couple of days now and there are some things I am not sure to do correctly. I have an app with a login view controller, a tab bar view controller and a landscape view controller that should only be used when the first tab is in landscape mode. I have added those 3 controllers as attributes of the AppDelegate. Each time I need to switch view I perform stuff like: - remove the current view from the super view - add the new view to the windows with [window addSubview:newViewController.view]

Is this the right way to do this ?

Thanks a lot, Luc


Solution

  • I don't like the idea of adding those ViewControllers as properties. Though it is fine.