RTRootNavigationController
RTRootNavigationController copied to clipboard
iOS11 NavVC在TabBarVC 出现偏移
TabBarVC -> RTNavigationController -> HomeVC
在homeVC里面push新页面
let vc = NewVC()
vc.hidesBottomBarWhenPushed = true
self.navigationController?.pushViewController(vc, animated: true)
在push到NewVC的过程中,HomeVC的view会变大(扩大到TabBar底部),使控件整体向下偏移,push后返回又正常

原生的不会是吗,你先设置 self.tabBarController.tabBar.isTranslucent = NO 试试
换成原生的不会,我是设置edgesForExtendedLayout = init(rawValue: 0) 即ViewController不占TabBar和NavigationBar
首先感谢作者 ,目前我的解决方案如下,希望作者有时间有时间fix一下
在 - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated 方法中添加下面的代码即可
CGRect frame = self.tabBarController.tabBar.frame;
frame.origin.y = [UIScreen mainScreen].bounds.size.height - frame.size.height;
self.tabBarController.tabBar.frame = frame;
直接改 frame 不是个好的解决办法,只能算是临时方案