I have an app which goes through a set of screens within a navigation controller, then there is a screen with a tab controller, which one of the contained views wants to display a modal view controller that should be displayed over the top of the whole app (not full screen though).
It's all working fine, but the modal window is partially covered at the top by the navigation controller. I've tried using self / self.tabBarController / self.navigationController / self.tabBarController.navigationController to call presentModalViewController but they either don't work or still display the modal window underneath.
I've been searching for an answer to this all day, everyone else seems to have problems when it DOES overlap, not when it doesn't.
Any ideas? Thanks. (code, screenshots & video below)
- (IBAction)add:(id)sender {
// create the view
AddAttainmentController *addScreen = [[AddAttainmentController alloc] init];
// pass in a selected pupil
[addScreen setPupils:[NSMutableArray arrayWithObject:pupil]];
// add the view to a navigation controller
UINavigationController *control = [[UINavigationController alloc] initWithRootViewController:addScreen];
// place the navigation controller on the screen
[self presentModalViewController:control animated:YES];
// release at the end
[control release];
[addScreen release];
}
Screenshots: http://cl.ly/032v2k0t0N1s1m3H0511 (you can see the navigation bar as the modal window slides in) http://cl.ly/1h0o453Y3Z051P3S1S37 (the navigation bar of the modal window is covered by the original)