eggswift / ESTabBarController

:octocat: ESTabBarController is a Swift model for customize UI, badge and adding animation to tabbar items. Support lottie!
MIT License
5.17k stars 578 forks source link

removeFromParent 后 ESTabBar不见了 #223

Closed MQL9011 closed 1 year ago

MQL9011 commented 4 years ago

ESTabBar --------| UINavigationViewController ---------------|MainViewController Push-------------| FirstViewController Present------| SecondViewController

以上是我的层级结构 FirstViewController Present出一个模态窗口后, 我通过removeFromParentFirstViewController 移出导航栈, 之后在SecondViewController中dissmiss后 回到MainViewController后发现ESTabBar不见了, 但是重新push再返回就又有了.

Jinzhengxuan commented 4 years ago

请问问题解决了么

MQL9011 commented 4 years ago

木有

eggswift commented 4 years ago

能来个demo么,我debug一下~

LineShine commented 3 years ago

iOS 14的锅,hidesBottomBarWhenPushed = true 只调一次就没问题! 如果多次调用了,在popToRoot前 设置回来 hidesBottomBarWhenPushed = false

stack-info commented 2 years ago

/* 处理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) }