iOS 隐藏自定义tabbar

 

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];
}

 

posted @ 2016-07-08 14:24  鸿鹄当高远  阅读(581)  评论(0编辑  收藏  举报