Showing
3 changed files
with
14 additions
and
7 deletions
No preview for this file type
... | @@ -45,13 +45,19 @@ extension UIViewController { | ... | @@ -45,13 +45,19 @@ extension UIViewController { |
45 | self.navigationItem.title = "" | 45 | self.navigationItem.title = "" |
46 | 46 | ||
47 | // Add backgroundColor | 47 | // Add backgroundColor |
48 | - let navigationBarAppearance = UINavigationBarAppearance() | 48 | + if #available(iOS 15, *) { |
49 | - navigationBarAppearance.configureWithDefaultBackground() | 49 | + let navigationBarAppearance = UINavigationBarAppearance() |
50 | - navigationBarAppearance.backgroundColor = .white | 50 | + navigationBarAppearance.configureWithDefaultBackground() |
51 | - | 51 | + navigationBarAppearance.backgroundColor = .white |
52 | - navigationItem.standardAppearance = navigationBarAppearance | 52 | + |
53 | - navigationItem.compactAppearance = navigationBarAppearance | 53 | + navigationItem.standardAppearance = navigationBarAppearance |
54 | - navigationItem.scrollEdgeAppearance = navigationBarAppearance | 54 | + navigationItem.compactAppearance = navigationBarAppearance |
55 | + navigationItem.scrollEdgeAppearance = navigationBarAppearance | ||
56 | + } else { | ||
57 | + navigationController?.navigationBar.barTintColor = UIColor.white | ||
58 | + navigationController?.navigationBar.tintColor = UIColor.white | ||
59 | + // navigationController?.navigationBar.isTranslucent = false | ||
60 | + } | ||
55 | } | 61 | } |
56 | 62 | ||
57 | 63 | ... | ... |
-
Please register or login to post a comment