Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TabbarController跳转 #296

Open
BigPoro opened this issue Nov 13, 2020 · 1 comment
Open

TabbarController跳转 #296

BigPoro opened this issue Nov 13, 2020 · 1 comment

Comments

@BigPoro
Copy link

BigPoro commented Nov 13, 2020

根视图初始化:
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的一级控制器。

@RocPengPeng
Copy link

遇到同样的问题,请问有什么解决方案吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants