RTRootNavigationController
RTRootNavigationController copied to clipboard
TabbarController跳转
根视图初始化: tabController.viewControllers = @[[[RTRootNavigationController alloc] initWithRootViewController:[story instantiateViewControllerWithIdentifier:@"Root"]], [[RTRootNavigationController alloc] initWithRootViewController:[story instantiateViewControllerWithIdentifier:@"Remove"]], [[RTRootNavigationController alloc] initWithRootViewController:[story instantiateViewControllerWithIdentifier:@"Scroll"]], [[RTRootNavigationController alloc] initWithRootViewController:[story instantiateViewControllerWithIdentifier:@"Table"]]]; self.window.rootViewController = tabController;
在某个二级控制器内。跳转第二层TabbarController: UITabBarController *tabController = [[RTTabBarController alloc] init];
tabController.viewControllers = @[[[RTRootNavigationController alloc] initWithRootViewController:[story instantiateViewControllerWithIdentifier:@"Root"]],
[[RTRootNavigationController alloc] initWithRootViewController:[story instantiateViewControllerWithIdentifier:@"Remove"]],
[[RTRootNavigationController alloc] initWithRootViewController:[story instantiateViewControllerWithIdentifier:@"Scroll"]],
[[RTRootNavigationController alloc] initWithRootViewController:[story instantiateViewControllerWithIdentifier:@"Table"]]];
[self.rt_navigationController pushViewController:tabController animated:YES complete:^(BOOL finished) {
[tabController.navigationController setNavigationBarHidden:YES animated:YES];
}];
然后再第二层的TabbarController的某个二级控制器手势返回,会直接回到第一个TabbarController,而不是第二个TabbarController的一级控制器。
遇到同样的问题,请问有什么解决方案吗?