您的位置:首页 > 产品设计 > UI/UE

当前视图是在UIWindow上,所以需要拿到主window,判断是UINavigationController的子类再选中第一个TabBar,否则不处理

2016-07-15 17:55 344 查看
//当前视图是在UIWindow上,所以需要拿到主window,判断是UINavigationController的子类再选中第一个TabBar,否则不处理

    UINavigationController *nav = (UINavigationController*)((AppDelegate*)[UIApplication sharedApplication].delegate).window.rootViewController;

    if ([nav isKindOfClass:[UINavigationController class]]) {

        ZLContainViewController *containViewController = nav.viewControllers.firstObject;

        [self.navigationController popToRootViewControllerAnimated:NO];

        [containViewController showTabBarControllerAtIndex:0];

    }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: