I am creating a UITableView with a UINavigationController programmatically:
- (void) displayView:(int)intNewView{
NSLog(@"%i", intNewView);
[currentView.view removeFromSuperview];
[currentView release];
switch (intNewView) {
......
case 5:
vc = [[RootViewController alloc] init];
currentView = [[UINavigationController alloc] initWithRootViewController:vc];
[currentView setTitle:@"Events"];
break;
}
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.5];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft
forView:self.view
cache:YES];
[self.view addSubview:currentView.view];
[UIView commitAnimations];
}
However when the view appears there is an annoying grey bar perched above the navigation controller, none of my other views suffer from this. Just the view with the UITableView and NavigationController.
Any ideas whats causing this and how to remove it?
Thanks,
Jack