iOS  隐藏自定义tabbar 

-(void)viewWillAppear:(BOOL)animated
{
    
    NSArray *array=self.tabBarController.view.subviews;
    
    UIView *view=array[2];
    
    view.frame=CGRectMake(0, [UIScreen mainScreen ].bounds.size.height, [UIScreen mainScreen ].bounds.size.width, 49);
    
    [UIView commitAnimations];
    
}

- (void)viewWillDisappear:(BOOL)animated
{
    
    NSArray *array=self.tabBarController.view.subviews;
    
    UIView *view=array[2];
    
    view.frame=CGRectMake(0, [UIScreen mainScreen ].bounds.size.height-49, [UIScreen mainScreen ].bounds.size.width, 49);
    
    [UIView commitAnimations];
}

 

相关文章:

  • 2022-12-23
  • 2021-08-10
  • 2022-12-23
  • 2021-10-19
  • 2021-07-27
  • 2022-12-23
  • 2022-03-08
  • 2022-02-06
猜你喜欢
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2022-12-23
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案