1.模态跳转
MessageViewController *VC = [[MessageViewController alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:VC];
[self.window.rootViewController presentViewController:nav animated:YES completion:nil];
2. PUSH跳转
UITabBarController *tab = (UITabBarController *)_window.rootViewController;
UINavigationController *nav = tab.viewControllers[tab.selectedIndex];
MessageViewController *vc = [[MessageViewController alloc] init];
vc.hidesBottomBarWhenPushed = YES;
[nav pushViewController:vc animated:YES];
网友评论