ESTabBarController
ESTabBarController copied to clipboard
removeFromParent 后 ESTabBar不见了
ESTabBar --------| UINavigationViewController ---------------|MainViewController Push-------------| FirstViewController Present------| SecondViewController
以上是我的层级结构
FirstViewController Present出一个模态窗口后, 我通过removeFromParent
将 FirstViewController
移出导航栈, 之后在SecondViewController中dissmiss后
回到MainViewController后发现ESTabBar不见了, 但是重新push再返回就又有了.
请问问题解决了么
木有
能来个demo么,我debug一下~
iOS 14的锅,hidesBottomBarWhenPushed = true
只调一次就没问题!
如果多次调用了,在popToRoot前 设置回来 hidesBottomBarWhenPushed = false
/** 处理iOS14特定版本页面返回时tabbar消失问题 */ override func popToRootViewController(animated: Bool) -> [UIViewController]? { if #available(iOS 14.0, *) { if self.viewControllers.count > 1 { self.topViewController?.hidesBottomBarWhenPushed = false } } return super.popToRootViewController(animated: animated) }
/** 处理iOS14特定版本页面返回时tabbar消失问题 */ override func popToViewController(_ viewController: UIViewController, animated: Bool) -> [UIViewController]? { if #available(iOS 14.0, *) { if self.viewControllers.count > 1 { self.topViewController?.hidesBottomBarWhenPushed = false } } return super.popToViewController(viewController, animated: animated) }