解决方法
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated
{
// 如果有大于控制器
if (self.childViewControllers.count >= 1) {
viewController.hidesBottomBarWhenPushed = YES;
}
[super pushViewController:viewController animated:animated];
// 修正push控制器tabbar上移问题
if (@available(iOS 11.0, *)){
// 修改tabBra的frame
CGRect frame = self.tabBarController.tabBar.frame;
frame.origin.y = [UIScreen mainScreen].bounds.size.height - frame.size.height;
self.tabBarController.tabBar.frame = frame;
}
}