views:

77

answers:

1

Hey guys,

I am working on a split-view based application for the iPad. I created a menu overlay system that has a button that leads into the split-view application. See comment for image

When you click the enter button, however, it results in this:

http://commandoswat.webs.com/Screen%20shot%202010-09-16%20at%201.37.11%20PM.png

Here is my code for the application delegate:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after app launch.
mainMenuController = [[MainMenuController alloc]init];
mainMenuController.sWindow = window;
mainMenuController.sController = splitViewController;
// Add the split view controller's view to the window and display.
[window addSubview:mainMenuController.view];
[window makeKeyAndVisible];

return YES;
}

Here is my code for the MainMenuController Enter Button:

-(IBAction) enterButton{
[self.view removeFromSuperview];
[sWindow addSubview:sController.view];

}

How do I make the split view take up the entire screen?

Any suggestions?

Thanks

A: 

Looks to me that your detail view isn't sized properly, and/or doesn't have its autoresizingMask property set appropriately (to have flexible width).

Shaggy Frog
I tried adding detailViewController.autoresizingMask = UIViewAutoresizingFlexibleWidth; in the Application delegate didFinishLaunching Method, but that didn't solve anything. Also, this problem only occurs when the menu overlay system is called. If I call [window addSubview:splitViewController.view]; everything is fine.
CSwat
solved, Thank you so much :) Both the splitViewController and detailViewController need to have flexible width.
CSwat