Override the UINavigationController method

/ / iOS 14 when using popToRootViewControllerAnimated tabbar does not display the problem solving - (NSArray < __kindof UIViewController * > *)popToRootViewControllerAnimated:(BOOL)animated { if (animated) { UIViewController *popController = self.viewControllers.lastObject; popController.hidesBottomBarWhenPushed = NO; } return [super popToRootViewControllerAnimated:animated]; }Copy the code

Override UIViewController init to hide tabbar by default

Tabbar - (instanceType)init {self = [super init]; if (self) { self.hidesBottomBarWhenPushed = YES; } return self; }Copy the code