We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
页面路径如下: CYLMineViewController -> xxxList -> xxxDetail
xxxDetail有一个按钮,点击执行如下逻辑: //返回CYLMineViewController [self.navigationController popToRootViewControllerAnimated:NO]; //跳转到某个tab页 AppDelegate *app = (AppDelegate *)[[UIApplication sharedApplication] delegate]; app.tabBarController.selectedIndex = 1; //push进去一个页面 [(UINavigationController *)app.tabBarController.selectedViewController pushViewController:[xxxList new] animated:YES];
出现问题: 点击返回时,tabbar会消失。试了一下系统的tabbar,也会消失
希望大神提供个解决方案,不胜感谢
逻辑很简单,源码已经贴出
The text was updated successfully, but these errors were encountered:
这个问题解决了吗? @ChenYilong
Sorry, something went wrong.
5ab213b
这个是v1.17.13 版本更新后的实现:
ref:5ab213b
//UIViewController+CYLTabBarControllerExtention - (UIViewController *)cyl_popSelectTabBarChildViewControllerAtIndex:(NSUInteger)index { UIViewController *viewController = [self cyl_getViewControllerInsteadOfNavigationController]; [viewController checkTabBarChildControllerValidityAtIndex:index]; CYLTabBarController *tabBarController = [viewController cyl_tabBarController]; tabBarController.selectedIndex = index; [viewController.navigationController popToRootViewControllerAnimated:NO]; UIViewController *selectedTabBarChildViewController = tabBarController.selectedViewController; return [selectedTabBarChildViewController cyl_getViewControllerInsteadOfNavigationController]; }
只需要把这两行代码的顺序调整一下就行了,像下边这样
tabBarController.selectedIndex = index; [navigationController popToRootViewControllerAnimated:NO];
原则上,上面两行的调用顺序对效果无影响,疑似是系统bug,Xcode9 系统修改了pop的调用时机。
No branches or pull requests
1. How to repeat the problem.
页面路径如下:
CYLMineViewController -> xxxList -> xxxDetail
xxxDetail有一个按钮,点击执行如下逻辑:
//返回CYLMineViewController
[self.navigationController popToRootViewControllerAnimated:NO];
//跳转到某个tab页
AppDelegate *app = (AppDelegate *)[[UIApplication sharedApplication] delegate];
app.tabBarController.selectedIndex = 1;
//push进去一个页面
[(UINavigationController *)app.tabBarController.selectedViewController pushViewController:[xxxList new] animated:YES];
出现问题:
点击返回时,tabbar会消失。试了一下系统的tabbar,也会消失
2. Please help me in this way.
希望大神提供个解决方案,不胜感谢
3. Here is a Demo.
逻辑很简单,源码已经贴出
4. Here is my Debug log
The text was updated successfully, but these errors were encountered: