My app simplified view hierarchy is the following:
<UITabBarController>,
| <UINavigationController>
| | <HomeViewController>
| <UINavigationController>
| | <ChatViewController>
| <UINavigationController>
| | <ProfileViewController>
The scenario is the following:
- I display the a view for example ChatViewController:
Then I go to the HomeViewController, I can tap a cell and be pushed to a UserProfileViewController where I dismiss the tabBar by implementing
userProfileVC.hidesBottomBarWhenPushed = true
A "new message" remote notification arrive, when I tap it, I am redirected to ChatViewController. When I tap a notification, I have a function that reset the view hierarchy:
fileprivate func resetViewHierarchy(_ rootTabBarViewController: ENTabBarController) { rootTabBarViewController.HomeNavigationController.popToRootViewController(animated: true) rootTabBarViewController.ChatNavigationController.popToRootViewController(animated: true) rootTabBarViewController.ProfileNavigationController.popToRootViewController(animated: true) }
When redirected to the ChatViewController, the UITabBar has disappeared and a black view is display at the same position
I tried in every controller but without effect
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.tabBarController?.tabBar.isHidden = true
}
Is it because of the userProfileVC.hidesBottomBarWhenPushed = true
and have you ever encountered this issue?
Thank you