Showing
3 changed files
with
7 additions
and
0 deletions
No preview for this file type
... | @@ -45,6 +45,7 @@ extension UIViewController { | ... | @@ -45,6 +45,7 @@ extension UIViewController { |
45 | self.navigationItem.title = "" | 45 | self.navigationItem.title = "" |
46 | 46 | ||
47 | // Add backgroundColor | 47 | // Add backgroundColor |
48 | + if #available(iOS 15, *) { | ||
48 | let navigationBarAppearance = UINavigationBarAppearance() | 49 | let navigationBarAppearance = UINavigationBarAppearance() |
49 | navigationBarAppearance.configureWithDefaultBackground() | 50 | navigationBarAppearance.configureWithDefaultBackground() |
50 | navigationBarAppearance.backgroundColor = .white | 51 | navigationBarAppearance.backgroundColor = .white |
... | @@ -52,6 +53,11 @@ extension UIViewController { | ... | @@ -52,6 +53,11 @@ extension UIViewController { |
52 | navigationItem.standardAppearance = navigationBarAppearance | 53 | navigationItem.standardAppearance = navigationBarAppearance |
53 | navigationItem.compactAppearance = navigationBarAppearance | 54 | navigationItem.compactAppearance = navigationBarAppearance |
54 | navigationItem.scrollEdgeAppearance = 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