RDVTabBarController
RDVTabBarController copied to clipboard
Why tabbarHeight 58.f?
tabBarHeight is fixed to 58.f
so my code [self.tabBar setHeight:49 + bottomHeight] mean nothing
Steps to Reproduce
CGSize viewSize = self.view.bounds.size;
CGFloat tabBarStartingY = viewSize.height;
CGFloat contentViewHeight = viewSize.height;
CGFloat tabBarHeight = CGRectGetHeight([[self tabBar] frame]);
if (!tabBarHeight) {
if (@available(iOS 11.0, *)) {
CGFloat safeAreaBottom = UIApplication.sharedApplication.keyWindow.safeAreaInsets.bottom;
tabBarHeight = 58.f + safeAreaBottom / 1.5f;
} else {
tabBarHeight = 58.f;
}
} else if (@available(iOS 11.0, *)) {
CGFloat safeAreaBottom = UIApplication.sharedApplication.keyWindow.safeAreaInsets.bottom;
tabBarHeight = 58.f + safeAreaBottom / 1.5f;
}
do like this?
else if (@available(iOS 11.0, *)) {
CGFloat safeAreaBottom = UIApplication.sharedApplication.keyWindow.safeAreaInsets.bottom;
tabBarHeight = tabBarHeight + safeAreaBottom / 1.5f;
}
我也有同样的问题。。。。 高度不应该是 49.f + sefeBottom。。 而且dome tabBar 没有适配安全区。。。
I have the same problem,tabbar setHeight only set current frame,after switch tab,the height of tabbar still equal tabBarHeight + safeAreaBottom / 1.5f。in order to set height of tabbar,we can create a new class which Inherited from RDVTabBarController and rewrite method viewDidLayoutSubviews。