-
Notifications
You must be signed in to change notification settings - Fork 378
Description
根视图初始化:
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的一级控制器。