interactivePopGesture 的安全区域底部布局问题

Safe Area bottom layout issue with interactivePopGesture

我们使用了默认的tabbarcontroller。 Tabbar rootViewController display tabbar and other viewcontroller hidden tabbar.The 当我们使用 interactivePopGesture 时,safearea 的底部布局不会更新高度。所有其他情况都可以正常工作

    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

// 问题出在您的 Tabbar 相关视图控制器属性中

按照以下步骤操作:

1) 选择了您的标签栏 prfile viewcontroller

2) 在推送时禁用隐藏底部栏

3) 当您在其他视图控制器上按下时,在按下时启用隐藏底部栏