Problems with UITableView when loading the view into the main window
- by GuidoMB
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