views:

214

answers:

1

Hi,

I have a view controller that is inside a popover, and I want to present a modal view controller from it. Here's my code:

EditDateViewController *dateViewController = [[EditDateViewController alloc] initWithNibName:@"EditDateViewController" bundle:[NSBundle mainBundle]];
    UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:dateViewController];
    navController.modalPresentationStyle = UIModalPresentationCurrentContext;
    [self presentModalViewController:navController animated:YES];
    [dateViewController release];
    [navController release];

The result is this:

alt text

For some reason, the navigation bar background is transparent (or black?) even though I did not configure it that way. I tried manually setting the tintColor property of the navigation bar in the viewDidLoad method of the modal view controller, but it had no effect.

+1  A: 

Try this

dateViewController.modalInPopover=YES;

self.navigationController.modalInPopover=YES;

iphony