AppDelegate - didFinishLaunchingWithOptions新增
//解决iOS 15 导航栏透明问题
if(@available(iOS 13.0, *)) {
UINavigationBarAppearance *appearance = [UINavigationBarAppearance new];
[appearance configureWithOpaqueBackground];
appearance.backgroundColor=_COLOR_NAVIGATION;
appearance.titleTextAttributes = NAVIGATIONBAR_TITLE_ATTRIBUTES_DICTIONARY;
[[UINavigationBar appearance] setStandardAppearance:appearance];
[[UINavigationBar appearance] setScrollEdgeAppearance:appearance];
}else{
// Fallback on earlier versions
}
网友评论