ios开发:跳转到根视图并跳转到第一个tabbar第一个页面

来源:互联网 发布:sql删除重复记录 编辑:程序博客网 时间:2024/06/06 02:54

跳转到根视图并跳转到第一个tabbar第一个页面

// 直接跳转到跟视图                self.navigationController.tabBarController.hidesBottomBarWhenPushed=NO;                self.navigationController.tabBarController.selectedIndex=0;  //0// 先跳转到自身tabbar主页,再跳转到第一个tabbar主页 (push出来的走这个方法)                for (UIViewController *vc in self.navigationController.viewControllers) {                    if ([vc isKindOfClass:[TrainingProgramTableViewController class]]) {                        [self.navigationController.tabBarController setSelectedIndex:0];                        [self.navigationController popToRootViewControllerAnimated:NO];                                           }                }


阅读全文
0 0
原创粉丝点击