asedra_le
asedra_le

Reputation: 3067

Bug when create a ViewController by code!

I create new "Window-Based" project in xCode and a subclass of UIViewController name Main View, colour MainView with blue. In My App Delegate i have method:

- (void)applicationDidFinishLaunching:(UIApplication *)application {    

    // Override point for customization after application launch
        mainViewController = [[MainView alloc] init]; // mainView is a subclass of UIViewController and be declared in AppDelegate interface.
 [window addSubview:mainViewController.view];
 //[window addSubview:navController.view];
    [window makeKeyAndVisible];
}

My MainView loaded into Window but it have clearance (image bellow). Anybody can help me to fix it :( alt text

Upvotes: 0

Views: 168

Answers (1)

W Dyson
W Dyson

Reputation: 4634

It would seem your problem has something to do with the status bar. If you were to get a measurement of that white space I'd put my money on height being 20 pixels.

Is it possible you have a view that is over or under compensating for a status bar that it think may/may not be visible?

Upvotes: 2

Related Questions