当我们使用原生的tabBarController切换时有时候会出现底部TabBar有块黑色闪一下消失了,原因是:
我们跳转页面时使用了self.hidesBottomBarWhenPushed = true,当你切换到tabBarController其它的selectedIndex之前没有将self.hidesBottomBarWhenPushed还原回false;
oc代码:
self.hidesBottomBarWhenPushed = NO
self.tabBarController.selectedIndex=1;
swift代码:
self.hidesBottomBarWhenPushed = false
self.tabBarController?.selectedIndex = 1