iOS 14 使用popToRootViewControllerAnimated时tabbar不显示问题解决

//重写UINavigationController方法

-(NSArray<__kindof UIViewController *> *)popToRootViewControllerAnimated:(BOOL)animated
{
    
    if (animated) {
        
        UIViewController *popController = self.viewControllers.lastObject;
        popController.hidesBottomBarWhenPushed = NO;
    }
    return [super popToRootViewControllerAnimated:animated];
}

你可能感兴趣的:(iOS 14 使用popToRootViewControllerAnimated时tabbar不显示问题解决)