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,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
......