Manos Chorianopoulos

fix nav bar bg

...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
6 // 6 //
7 7
8 import UIKit 8 import UIKit
9 +import SwiftEventBus
9 10
10 @objc public class LoyaltyAnalysisViewController: UIViewController { 11 @objc public class LoyaltyAnalysisViewController: UIViewController {
11 12
......
...@@ -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
......