隐藏UITabBarController的tabBar
隐藏UITabBarController的tabBar的时候,如果不做处理那么下方会多处49pix的白条或者其他颜色的条,解决这个问题的方法如下
- (void)setTabBarHidden:(BOOL)hidden { [self.tabBar setHidden:hidden]; UIView *contentView = [[self.view subviews] firstObject]; CGRect frame = contentView.frame; if (hidden) { frame.size.height += 49; } else { frame.size.height -= 49; } contentView.frame = frame; }