Hi. I have a small problem putting a navigation controller inside a splitview controller inside a tabbar controller. I do all the work programmatically without interface builder.
The problem is that the navigation controller seems to place itself a bunch of pixels below its original supposed position. This problem only happens with navigation controller, i tried with tableviews and customized simple views and they fit correctly immediately beneath the ipad top bar.
I include a screenshot of that:
The code is the one below (tabbar and splitview are defined in the appdelegate, this is the viewcontroller placed on the left of the splitview):
Thank you!
The problem is that the navigation controller seems to place itself a bunch of pixels below its original supposed position. This problem only happens with navigation controller, i tried with tableviews and customized simple views and they fit correctly immediately beneath the ipad top bar.
I include a screenshot of that:

The code is the one below (tabbar and splitview are defined in the appdelegate, this is the viewcontroller placed on the left of the splitview):
Code:
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
userKindTableViewController=[[UITableViewController alloc] init];
navigationController=[[UINavigationController alloc] initWithRootViewController:userKindTableViewController];
userKind=[[UITableView alloc] initWithFrame:navigationController.view.frame style:UITableViewStyleGrouped];
userKind.dataSource=self;
userKind.delegate=self;
[userKind reloadData];
userKindTableViewController.tableView=userKind;
userKindTableViewController.title=@"Categorie utenti";
self.view=navigationController.view;
}
Thank you!