views:

36

answers:

0

So I think I have my Views all messed up, and how these work. Actually, I know I do, cause I am getting this: http://www.designmenace.com/downloads/landscapeWhatWhat.png . The iPad is turned landscape and so is the view but it's not rotated properly within the window. But the top bar is rotated properly! And this only happens about 70% of the time...sometimes it works fine.

So what I have is my MainDelegate where I add a UISplitViewController, which I declare above, by saying:

[window addSubView:splitViewController.view];
[window makeKeyAndVisible];

An UIButton in the detail view of this split view controller allows me to launch a separate view controller which has the game in it. So I add a @protocol LaunchNewView in the MainDelegate and then call it from the detail view of the split view controller.

This will then add my new view controller with the game and and remove the split view by doing the following:

[window addSubview:gameViewController.view];
[window makeKeyAndVisible];
[splitViewController.view removeFromSuperview];

And then I have a button to reverse the process. My question is...am I doing this right? Should this be in the Main Delegate, or do I need a Root View Controller that all of this is going on in? Or am I even doing it right at all!

Help!