My app ui heirarchy look like as shown. UItabbarcontroller -> navigation-controllers -> view-controllers.
The problem am facing is hidesBottomBarWhenPushed is not working when i try to push a new controller from 1st Vc on button click
if let newVc = UIStoryboard.homeSB.instantiateViewController(withIdentifier: NewViewController.identifier()) as? NewViewController{
self.navigationController?.hidesBottomBarWhenPushed = true
self.navigationController?.pushViewController(viewAllVc, animated: true)
}
The Tabbar is still showing in the NewVc
To hide the tab bar in new VC you can call this in viewDidLoad():
self.tabBarController?.tabBar.isHidden = true
Also, you should call method hidesBottomBarWhenPushed from your VC, not from the navigation controller:
if let newVc = UIStoryboard.homeSB.instantiateViewController(withIdentifier: NewViewController.identifier()) as? NewViewController{
newVc.hidesBottomBarWhenPushed = true
self.navigationController?.pushViewController(viewAllVc, animated: true)
}
Furthermore, you can make it on your new VC storyboard:
hidesBottomBarWhenPushed in developer.apple.com/documentation