修改
- (NSArray<__kindof UIViewController *> *)popToRootViewControllerAnimated:(BOOL)animated {
// fix https://developer.apple.com/forums/thread/660750
if (@available(iOS 14.0, *)) {
if (self.viewControllers.count > 1) self.topViewController.hidesBottomBarWhenPushed = NO;
}
NSArray<__kindof UIViewController *> *viewControllers = [super popToRootViewControllerAnimated:animated];
return viewControllers;
}
鏈接
https://developer.apple.com/forums/thread/660750
https://github.com/ChenYilong/CYLTabBarController/issues/538