iOS TabBar 隐藏的问题

在ios 8 中

    self.tabBarController.tabBar.hidden = YES;

self.view 的frame也会变小,缺少 self.tabBarController.tabBard的高度,这样加在self.view上面的self.tabBarController.tabBard位置会不显示

解决办法:

1.改变 self.view.frame = [[UIScreen mainScreen] bounds];BUT,如果是button等响应事件的控件,就需要使用第二种方法

2.将控件加在self.tabBarController.view上面

在ios 10中就不出现此问题

原文地址:https://www.cnblogs.com/lsh1234/p/6555139.html