我们使用了默认的tabbarcontroller。 Tabbar rootViewController显示tabbar和其他viewcontroller隐藏tabbar。当我们使用interactivePopGesture时,safearea的底部布局不会更新hight。所有其他情况下它的工作正常
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
if navigationController?.viewControllers[0] == self {
tabBarController?.tabBar.isHidden = false
} else {
tabBarController?.tabBar.isHidden = true
}
}
// i was solved this issue like that in appdelegate when iam check user already login then i will remove removeGestureRecognizer from view
let mainStoryboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let loginPageView = mainStoryboard.instantiateViewController(withIdentifier: "CustomTabVCID") as! CustomTabVC
let rootViewController = self.window!.rootViewController as! UINavigationController
rootViewController.view.removeGestureRecognizer(rootViewController.interactivePopGestureRecognizer!)
rootViewController.pushViewController(loginPageView, animated: true)
// for bottom bar
// Use this [![enter image description here][1]][1]
// add this line when you navigate to a ViewController hidesBottomBarWhenPushed
let vc = storyboard.instantiateViewController(withIdentifier: VC_IDENTIFIER) as! YourViewController
vc.hidesBottomBarWhenPushed = true
navigationController?.pushViewController(vc, animated: true)
// hope its work for you
or try with Main StoryBoard!
[1]: https://i.stack.imgur.com/IiVrj.png