变相隐藏UITabBarController的TabBar

UITabBarController *tabBarCtrl;

//将ContentView的frame放大到全屏,就把TabBar变相隐藏了,不会出现白色区域。

[tabBarCtrl.tabBar setHidden:YES];
  UIView *contentView;
  if ( [[tabBarCtrl.view.subviews objectAtIndex:0] isKindOfClass:[UITabBar class]] )
   contentView = [self.view.subviews objectAtIndex:1];
  else
   contentView = [self.view.subviews objectAtIndex:0];
  [contentView setFrame:CGRectMake(0,0, 768, 1024)];


你可能感兴趣的:(Class,UIView)