0
votes

Okay, working on a transition between a view with a tabbar and another view which is to be an information/about view. I have the code to transition from the view with tabbar and to transition back to previous view, but during the transition back I lose the tabbar at the bottom. Not sure exactly how to approach this with the tabbar in the MainWindow.xib

E.g.:

  • (IBAction)backButtonPressed:(id)sender { TablesViewController *tvc = [[TablesViewController alloc] initWithNibName:@"TablesView" bundle:nil];

    tvc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [self presentModalViewController:tvc animated:YES]; [tvc release];

}

Thanks, np

2

2 Answers

1
votes

Try presenting the modal transition from the containing instance of UITabBarController and not the UIViewController the action was triggered from.

- (IBAction)backButtonPressed:(id)sender
{
    TablesViewController *tvc = [[TablesViewController alloc] initWithNibName:@"TablesView" bundle:nil;
    tvc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    [self.tabBarController presentModalViewController:tvc animated:YES];
    [tvc release];
}
0
votes

I had the exact same problem, did a ugly solution:

- (IBAction)backButtonPressed:(id)sender { 
[self.navigationController dismissModalViewControllerAnimated:YES]; 
}