iOS 隐藏tabbar代码详解
-(void)viewWillAppear:(BOOL)animated
{
NSArray*array=self.tabBarController.view.subviews;
UIView*view=array[2];
view.frame=CGRectMake(0,[UIScreenmainScreen].bounds.size.height,[UIScreenmainScreen].bounds.size.width,49);
[UIViewcommitAnimations];
}
-(void)viewWillDisappear:(BOOL)animated
{
NSArray*array=self.tabBarController.view.subviews;
UIView*view=array[2];
view.frame=CGRectMake(0,[UIScreenmainScreen].bounds.size.height-49,[UIScreenmainScreen].bounds.size.width,49);
[UIViewcommitAnimations];
}
以上所述是小编给大家介绍的iOS隐藏tabbar代码详解的全部叙述,希望对大家有所帮助!