if (@available(iOS 15.0,*) ) {
UINavigationBarAppearance *apperance = [[UINavigationBarAppearance alloc]init];
[apperance configureWithOpaqueBackground];// 重置背景和阴影颜色
apperance.backgroundColor = [UIColor whiteColor];
apperance.backgroundEffect = nil;
// 去除导航栏阴影(如果不设置clear,导航栏底下会有一条阴影线)
apperance.shadowColor = [UIColor clearColor];
[apperance setShadowImage:[UIImage qmui_imageWithColor:[UIColor clearColor]]];
[apperance setTitleTextAttributes:textAttributes];
[[UINavigationBar appearance]setStandardAppearance:apperance];
[[UINavigationBar appearance]setScrollEdgeAppearance:apperance];
}else{
[[UINavigationBar appearance] setTitleTextAttributes:textAttributes];
[[UINavigationBar appearance] setBarTintColor:[UIColor whiteColor]];
[[UINavigationBar appearance] setShadowImage:[UIImage new]];
}
[[UINavigationBar appearance] setTranslucent:NO];