开发者

iphone loss of tabbar during uimodaltransition

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


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];
}


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

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜