当前位置 : 主页 > 手机开发 > ios >

iOS 隐藏tabbar代码详解

来源:互联网 收集:自由互联 发布时间:2021-05-16
-(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 commitAn
-(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];
}

以上所述是小编给大家介绍的iOS 隐藏tabbar代码详解的全部叙述,希望对大家有所帮助!

网友评论