tags:

views:

34

answers:

2

I'm using addSubView twice in my app and both times it adds the view too high up the view, its off the screen at the top. See below... I have load the views like this as I nothing else works, cause me problems.

I just don't understand why they are showing off the screen?

What do I need to do to fix this ?

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
[window addSubview:rootController.view];
[window makeKeyAndVisible]; 
lvc = [[GettingStartedViewController alloc] 
            initWithNibName:@"GettingStartedView" bundle:nil];
[window addSubview:lvc.view];       
return YES;
}

And in my GettingStartedView ...

- (IBAction) showHelp:(id)inSender {    
theController = [[HelpViewController alloc] initWithNibName:@"HelpView" 
                    bundle:nil onPage:HelpPageGettingStarted];
[self.view addSubview:theController.view];
}

alt text

A: 

Check the wantsFullScreenLayout property of your root view controller, make sure it's not set.

Aleph
rootController in didFinishLaunchingWithOptions ?
Jules
You can set it there, or just un-check the checkbox in your .xib file.
Aleph
+1  A: 

Set the location:

rootController.view.frame = CGRectMake(0, 20, 320, 460);
DarkDust
rootController in didFinishLaunchingWithOptions ?
Jules
Um, that's not even a complete sentence. Please be more explicit and descriptive, I have no idea what you are trying to ask me :-)
DarkDust