views:

32

answers:

1

I have the starter point of my application this window (white background):

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    mainScreen = [[MainScreenController alloc] initWithNibName:@"MainScreenController" bundle:[NSBundle mainBundle]];

    // add it to the main window
    [window  addSubview:[mainScreen view]];

    // show view
    [window makeKeyAndVisible];

    NSLog(@"started");

    return YES;
}

And MainScreenController is an UIViewController with (blackBackground) created by the Interface Builder.

The application executes perfectly but the first time, the black view is moved up like the height of the status iphone pannel (leaving white rectangle at the bottom).

If I rotate the iPhone twice, the view is perfectly positioned in the right place, filling all the screen with the black background.

Any idea?

Thanks!

A: 
progrmr
Actually I had this simulated status bar at grey, so I don't know what's the issue...
zegnus
@zegnus: i've edited my answer. i think the issue is how you are innitializing your mainscreen's view.
progrmr
I've reestructured all my layouts using a navigation bar at the top and now is all ok.Thanks for the advice!
zegnus
You're welcome. Thanks for up voting and accepting my answer :-(
progrmr
SOrry, I didn not realized that! going!
zegnus