@property (nonatomic,strong)UIImageView * barImageView;
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
if (@available(iOS 11.0, *)) {
[self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
[[self.navigationController.navigationBar.subviews objectAtIndex:0] setAlpha:0];
[self.navigationController.navigationBar setShadowImage:[[UIImage alloc]init]];
}else{
self.barImageView = self.navigationController.navigationBar.subviews.firstObject;
self.barImageView.alpha = 0;
}
[[self rdv_tabBarController] setTabBarHidden:NO animated:YES];
}
网友评论