我有一个带有3个UINavigationControllers的UITabBarController .
uITabBarController.viewControllers = [uINavigationController_1, uINavigationController_2, uINavigationController_3]
在每个UINavigationController中:
self.setViewControllers([self.someTableViewController], animated: false)
在someTableViewController中:
self.navigationController?.pushViewController(viewController,animated:true)
UITabbar与UINavigationController中的Views重叠?
我试过在代码中使用约束,以下是在navigationController中:
override func updateViewConstraints() {
self.view.bottomAnchor.constraintEqualToAnchor(self.tabBarController?.view.topAnchor).active = true
super.updateViewConstraints()
}
1 回答
在Interface Builder中,选择有问题的UINavigationController,单击Attribute Inspector,然后取消选择“Extend Edges:Under Bottom Bars” .