Browse Source

improved UINavigationBarAppearance

Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
Marino Faggiana 2 years ago
parent
commit
cdc9354918
1 changed files with 3 additions and 3 deletions
  1. 3 3
      iOSClient/Main/NCMainNavigationController.swift

+ 3 - 3
iOSClient/Main/NCMainNavigationController.swift

@@ -33,15 +33,15 @@ class NCMainNavigationController: UINavigationController {
         navigationBar.tintColor = .systemBlue
         navigationBar.tintColor = .systemBlue
 
 
         let standardAppearance = UINavigationBarAppearance()
         let standardAppearance = UINavigationBarAppearance()
+        standardAppearance.configureWithDefaultBackground()
 
 
-        standardAppearance.configureWithOpaqueBackground()
         standardAppearance.largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.label]
         standardAppearance.largeTitleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.label]
-        standardAppearance.configureWithOpaqueBackground()
         standardAppearance.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.label]
         standardAppearance.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.label]
-        standardAppearance.backgroundColor = .systemGroupedBackground
+        standardAppearance.backgroundColor = NCBrandColor.shared.defaultNavigationBar
         navigationBar.standardAppearance = standardAppearance
         navigationBar.standardAppearance = standardAppearance
 
 
         let scrollEdgeAppearance = UINavigationBarAppearance()
         let scrollEdgeAppearance = UINavigationBarAppearance()
+        scrollEdgeAppearance.configureWithDefaultBackground()
 
 
         scrollEdgeAppearance.backgroundColor = .systemBackground
         scrollEdgeAppearance.backgroundColor = .systemBackground
         scrollEdgeAppearance.shadowColor = .clear
         scrollEdgeAppearance.shadowColor = .clear