Problems with UITableView when loading the view into the main window

Posted by GuidoMB on Stack Overflow See other posts from Stack Overflow or by GuidoMB
Published on 2010-04-19T23:59:51Z Indexed on 2010/04/20 0:03 UTC
Read the original article Hit count: 208

I've created a sub class of UITableViewController named LoginViewController with the XIB file using XCode. Then I opened the XIB file with IB and set the table's style to grouped. Finally I wrote the following code:

- (void)applicationDidFinishLaunching:(UIApplication *)application {    
    LoginViewController *loginViewController = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:[NSBundle mainBundle]];
    [window addSubview: loginViewController.view];
    window.backgroundColor = [UIColor blueColor];
    [window makeKeyAndVisible];
    [window layoutSubviews];
}

I set the window's background color to blue for you to see what the problem is. I put a link to the screenshot

If I don't use the table style grouped the problem does not occur

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uitableview