iOS15 导航栏消失问题

///iOS 15更新后,导航栏变白,静止情况看不清,可以这么写解决问题
if (@available(iOS 13.0, *)) {
UINavigationBarAppearance *appearance = [UINavigationBarAppearance new];
[appearance configureWithOpaqueBackground];
appearance.backgroundColor = [UIColor purpleColor];
self.navigationController.navigationBar.standardAppearance = appearance;
self.navigationController.navigationBar.scrollEdgeAppearance = self.navigationController.navigationBar.standardAppearance;
} else {
// Fallback on earlier versions
}

你可能感兴趣的:(iOS15 导航栏消失问题)