RTRootNavigationController icon indicating copy to clipboard operation
RTRootNavigationController copied to clipboard

TabbarController跳转

Open BigPoro opened this issue 4 years ago • 1 comments

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

BigPoro avatar Nov 13 '20 03:11 BigPoro

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

RocPengPeng avatar Jun 06 '22 09:06 RocPengPeng