开发者

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:(UIAppl开发者_开发问答ication *)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 :(

Bug when create a ViewController by code!


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜