0

My app simplified view hierarchy is the following:

<UITabBarController>,
   | <UINavigationController>
   |    | <HomeViewController>
   | <UINavigationController>
   |    | <ChatViewController>
   | <UINavigationController>
   |    | <ProfileViewController>

The scenario is the following:

  1. I display the a view for example ChatViewController:

enter image description here

  1. 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

  2. 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)
    }
    
  3. When redirected to the ChatViewController, the UITabBar has disappeared and a black view is display at the same position

enter image description here

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

Florian Ldt
  • 1,125
  • 3
  • 13
  • 31

0 Answers0