Quellcode durchsuchen

update add background image in almost all view

alqindiirsyam vor 1 Jahr
Ursprung
Commit
c7c921758b
25 geänderte Dateien mit 251 neuen und 93 gelöschten Zeilen
  1. 2 4
      appbuilder-ios/AppBuilder/AppBuilder/AppDelegate.swift
  2. 11 5
      appbuilder-ios/AppBuilder/AppBuilder/FourthTabViewController.swift
  3. 10 2
      appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift
  4. 38 11
      appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift
  5. 4 1
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Palio.storyboard
  6. 24 21
      appbuilder-ios/NexilisLite/NexilisLite/Source/APIS.swift
  7. 4 4
      appbuilder-ios/NexilisLite/NexilisLite/Source/Extension.swift
  8. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/FloatingButton/FloatingButton.swift
  9. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/IncomingThread.swift
  10. 13 21
      appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift
  11. 116 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/Utils.swift
  12. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraAudioConference.swift
  13. 2 3
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraAudioViewController.swift
  14. 1 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraCallContactViewController.swift
  15. 2 3
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraVideoViewController.swift
  16. 3 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorGroup.swift
  17. 3 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift
  18. 2 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorStarMessages.swift
  19. 1 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/ListGroupImages.swift
  20. 1 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Contact/ContactCallViewController.swift
  21. 1 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/BroadcastMembersTableViewController.swift
  22. 3 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ContactChatViewController.swift
  23. 4 4
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/GroupDetailViewController.swift
  24. 2 4
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/SettingTableViewController.swift
  25. 1 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Streaming/SeminarViewController.swift

+ 2 - 4
appbuilder-ios/AppBuilder/AppBuilder/AppDelegate.swift

@@ -110,7 +110,7 @@ extension AppDelegate: ConnectDelegate, UNUserNotificationCenterDelegate {
             editorPersonalVC.onGoingCC = true
             editorPersonalVC.isRequestContactCenter = false
         }
-        let navigationController = UINavigationController(rootViewController: editorPersonalVC)
+        let navigationController = CustomNavigationController(rootViewController: editorPersonalVC)
         navigationController.modalPresentationStyle = .fullScreen
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -121,7 +121,6 @@ extension AppDelegate: ConnectDelegate, UNUserNotificationCenterDelegate {
         UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
-        navigationController.view.backgroundColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .black : .white
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
         } else {
@@ -134,7 +133,7 @@ extension AppDelegate: ConnectDelegate, UNUserNotificationCenterDelegate {
         editorGroupVC.hidesBottomBarWhenPushed = true
         editorGroupVC.unique_l_pin = opposite
         editorGroupVC.fromNotification = true
-        let navigationController = UINavigationController(rootViewController: editorGroupVC)
+        let navigationController = CustomNavigationController(rootViewController: editorGroupVC)
         navigationController.modalPresentationStyle = .fullScreen
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -145,7 +144,6 @@ extension AppDelegate: ConnectDelegate, UNUserNotificationCenterDelegate {
         UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
-        navigationController.view.backgroundColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .black : .white
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
         } else {

+ 11 - 5
appbuilder-ios/AppBuilder/AppBuilder/FourthTabViewController.swift

@@ -307,12 +307,20 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                 var bgChoosen = ""
                 let arrayBg = listBg.split(separator: ",")
                 bgChoosen = String(arrayBg[Int.random(in: 0..<arrayBg.count)])
-                Utils.fetchDataWithCookiesAndUserAgent(from: URL(string: PrefsUtil.getURLBase() + "get_file_from_path?img=" + bgChoosen)!) { data, response, error in
+                let urlString = PrefsUtil.getURLBase() + "get_file_from_path?img=" + bgChoosen
+                if let cachedImage = ImageCache.shared.image(forKey: urlString) {
+                    DispatchQueue.main.async() { [self] in
+                        backgroundImage.image = cachedImage
+                    }
+                    return
+                }
+                Utils.fetchDataWithCookiesAndUserAgent(from: URL(string: urlString)!) { data, response, error in
                     guard let data = data, error == nil else { return }
                     // always update the UI from the main thread
                     DispatchQueue.main.async() { [self] in
                         if UIImage(data: data) != nil {
                             backgroundImage.image = UIImage(data: data)!
+                            ImageCache.shared.save(image: UIImage(data: data)!, forKey: urlString)
                         }
                     }
                 }
@@ -648,7 +656,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                 return
             }
             let controller = ScannerViewController()
-            let navigationController = UINavigationController(rootViewController: controller)
+            let navigationController = CustomNavigationController(rootViewController: controller)
             navigationController.navigationBar.tintColor = .white
             navigationController.navigationBar.barTintColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
             navigationController.navigationBar.isTranslucent = false
@@ -656,7 +664,6 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
             UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
             navigationController.navigationBar.titleTextAttributes = textAttributes
-            navigationController.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
             navigationController.navigationBar.overrideUserInterfaceStyle = .dark
             navigationController.navigationBar.barStyle = .black
             navigationController.modalPresentationStyle = .custom
@@ -666,7 +673,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
             if item.title != "Notification Message(s)".localized() {
                 controller.isPersonal = false
             }
-            let navigationController = UINavigationController(rootViewController: controller)
+            let navigationController = CustomNavigationController(rootViewController: controller)
             navigationController.navigationBar.tintColor = .white
             navigationController.navigationBar.barTintColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
             navigationController.navigationBar.isTranslucent = false
@@ -676,7 +683,6 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
             UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
             navigationController.navigationBar.titleTextAttributes = textAttributes
-            navigationController.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
             self.present(navigationController, animated: true)
         } else if item.title == "Backup & Restore".localized() {
             let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "backupRestore") as! BackupRestoreView

+ 10 - 2
appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift

@@ -167,6 +167,7 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
     
     @objc func startConversation(){
         let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactChatNav") as! UINavigationController
+        Utils.addBackground(view: navigationController.view)
         navigationController.modalPresentationStyle = .fullScreen
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -175,7 +176,6 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
-        navigationController.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
         navigationController.navigationBar.overrideUserInterfaceStyle = .dark
         navigationController.navigationBar.barStyle = .black
         self.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -388,12 +388,20 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
                 var bgChoosen = ""
                 let arrayBg = listBg.split(separator: ",")
                 bgChoosen = String(arrayBg[Int.random(in: 0..<arrayBg.count)])
-                Utils.fetchDataWithCookiesAndUserAgent(from: URL(string: PrefsUtil.getURLBase() + "get_file_from_path?img=" + bgChoosen)!) { data, response, error in
+                let urlString = PrefsUtil.getURLBase() + "get_file_from_path?img=" + bgChoosen
+                if let cachedImage = ImageCache.shared.image(forKey: urlString) {
+                    DispatchQueue.main.async() {  [self] in
+                        backgroundImage.image = cachedImage
+                    }
+                    return
+                }
+                Utils.fetchDataWithCookiesAndUserAgent(from: URL(string: urlString)!) { data, response, error in
                     guard let data = data, error == nil else { return }
                     // always update the UI from the main thread
                     DispatchQueue.main.async() { [self] in
                         if UIImage(data: data) != nil {
                             backgroundImage.image = UIImage(data: data)!
+                            ImageCache.shared.save(image: UIImage(data: data)!, forKey: urlString)
                         }
                     }
                 }

+ 38 - 11
appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift

@@ -66,8 +66,12 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
         }
     }
     
+    override func viewDidDisappear(_ animated: Bool) {
+        Utils.randomizeBackground(view: self.navigationController?.view)
+    }
+    
     func startView() {
-        self.navigationController?.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
+        Utils.addBackground(view: self.navigationController?.view)
         let topBorder = CALayer()
         topBorder.backgroundColor = UIColor.gray.withAlphaComponent(0.5).cgColor
         topBorder.frame = CGRect(x: 0, y: 0, width: tabBar.frame.size.width, height: 1)
@@ -303,7 +307,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
                     FirstTabViewController.showModal = false
                     ThirdTabViewController.showModal = false
                 }
-                let navigationController = UINavigationController(rootViewController: controller)
+                let navigationController = CustomNavigationController(rootViewController: controller)
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -314,7 +318,6 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
                 UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
-                navigationController.view.backgroundColor = UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.traitCollection.userInterfaceStyle == .dark ? .black : .white
                 ViewController.def?.show(b: false)
                 ViewController.def?.thirdTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
                 ViewController.def?.firstTab?.webView?.evaluateJavaScript("{if(pauseAll){pauseAll();}}")
@@ -454,11 +457,21 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
                 })
             } else {
                 DispatchQueue.global().async {
-                    Utils.fetchDataWithCookiesAndUserAgent(from: URL(string: PrefsUtil.getUrlDock()!)!) { data, response, error in
+                    let urlString = PrefsUtil.getUrlDock()!
+                    if let cachedImage = ImageCache.shared.image(forKey: urlString) {
+                        DispatchQueue.main.async() {
+                            ViewController.middleButton.setBackgroundImage(cachedImage, for: .normal)
+                        }
+                        return
+                    }
+                    Utils.fetchDataWithCookiesAndUserAgent(from: URL(string: urlString)!) { data, response, error in
                         guard let data = data, error == nil else { return }
                         // always update the UI from the main thread
                         DispatchQueue.main.async() {
-                            ViewController.middleButton.setBackgroundImage(UIImage(data: data), for: .normal)
+                            if UIImage(data: data) != nil {
+                                ViewController.middleButton.setBackgroundImage(UIImage(data: data), for: .normal)
+                                ImageCache.shared.save(image: UIImage(data: data)!, forKey: urlString)
+                            }
                         }
                     }
                 }
@@ -581,7 +594,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
             if !Utils.getForceAnonymous() && !Utils.getSetProfile() {
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeDevice") as! ChangeDeviceViewController
                 controller.forceLogin = true
-                let navigationController = UINavigationController(rootViewController: controller)
+                let navigationController = CustomNavigationController(rootViewController: controller)
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
                 navigationController.navigationBar.isTranslucent = false
@@ -591,7 +604,6 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
                 UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
-                navigationController.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.modalTransitionStyle = .crossDissolve
                 self.present(navigationController, animated: true)
@@ -617,12 +629,20 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
                     var bgChoosen = ""
                     let arrayBg = listBg.split(separator: ",")
                     bgChoosen = String(arrayBg[Int.random(in: 0..<arrayBg.count)])
-                    Utils.fetchDataWithCookiesAndUserAgent(from: URL(string: PrefsUtil.getURLBase() + "get_file_from_path?img=" + bgChoosen)!) { data, response, error in
+                    let urlString = PrefsUtil.getURLBase() + "get_file_from_path?img=" + bgChoosen
+                    if let cachedImage = ImageCache.shared.image(forKey: urlString) {
+                        DispatchQueue.main.async() {
+                            bgImage.image = cachedImage
+                        }
+                        return
+                    }
+                    Utils.fetchDataWithCookiesAndUserAgent(from: URL(string: urlString)!) { data, response, error in
                         guard let data = data, error == nil else { return }
                         // always update the UI from the main thread
                         DispatchQueue.main.async() {
                             if UIImage(data: data) != nil {
                                 bgImage.image = UIImage(data: data)!
+                                ImageCache.shared.save(image: UIImage(data: data)!, forKey: urlString)
                             }
                         }
                     }
@@ -693,12 +713,20 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
                     var bgChoosen = ""
                     let arrayBg = listBg.split(separator: ",")
                     bgChoosen = String(arrayBg[Int.random(in: 0..<arrayBg.count)])
-                    Utils.fetchDataWithCookiesAndUserAgent(from: URL(string: PrefsUtil.getURLBase() + "get_file_from_path?img=" + bgChoosen)!) { data, response, error in
+                    let urlString = PrefsUtil.getURLBase() + "get_file_from_path?img=" + bgChoosen
+                    if let cachedImage = ImageCache.shared.image(forKey: urlString) {
+                        DispatchQueue.main.async() {
+                            bgImage.image = cachedImage
+                        }
+                        return
+                    }
+                    Utils.fetchDataWithCookiesAndUserAgent(from: URL(string: urlString)!) { data, response, error in
                         guard let data = data, error == nil else { return }
                         // always update the UI from the main thread
                         DispatchQueue.main.async() {
                             if UIImage(data: data) != nil {
                                 bgImage.image = UIImage(data: data)!
+                                ImageCache.shared.save(image: UIImage(data: data)!, forKey: urlString)
                             }
                         }
                     }
@@ -777,13 +805,12 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
             viewTerm.addSubview(webView)
             webView.anchor(top: viewTerm.safeAreaLayoutGuide.topAnchor, left: viewTerm.safeAreaLayoutGuide.leftAnchor, bottom: viewTerm.safeAreaLayoutGuide.bottomAnchor, right: viewTerm.safeAreaLayoutGuide.rightAnchor)
         }
-        let navigationController = UINavigationController(rootViewController: termVC!)
+        let navigationController = CustomNavigationController(rootViewController: termVC!)
         navigationController.navigationBar.tintColor = .mainColor
         navigationController.navigationBar.barTintColor = .white
         navigationController.navigationBar.isTranslucent = false
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.mainColor]
         navigationController.navigationBar.titleTextAttributes = textAttributes
-        navigationController.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
         termVC!.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Close".localized(), style: .plain, target: self, action: #selector(closeTerm))
         welcomeVC.present(navigationController, animated: true)
     }

+ 4 - 1
appbuilder-ios/NexilisLite/NexilisLite/Resource/Palio.storyboard

@@ -1731,7 +1731,7 @@
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="8aL-ZR-t6m">
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <prototypes>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="reuseIdentifierChat" id="zd4-bn-4R1">
                                 <rect key="frame" x="0.0" y="50" width="414" height="43.5"/>
@@ -1740,6 +1740,7 @@
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                 </tableViewCellContentView>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             </tableViewCell>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="reuseIdentifierContact" id="C8N-ND-gaQ">
                                 <rect key="frame" x="0.0" y="93.5" width="414" height="43.5"/>
@@ -1748,6 +1749,7 @@
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                 </tableViewCellContentView>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             </tableViewCell>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="reuseIdentifierGroup" id="fwt-K3-Cph">
                                 <rect key="frame" x="0.0" y="137" width="414" height="43.5"/>
@@ -1756,6 +1758,7 @@
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
                                     <autoresizingMask key="autoresizingMask"/>
                                 </tableViewCellContentView>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                             </tableViewCell>
                         </prototypes>
                         <connections>

+ 24 - 21
appbuilder-ios/NexilisLite/NexilisLite/Source/APIS.swift

@@ -33,7 +33,7 @@ public class APIS: NSObject {
         alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
             let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
             controller.forceLogin = true
-            let navigationController = UINavigationController(rootViewController: controller)
+            let navigationController = CustomNavigationController(rootViewController: controller)
             navigationController.defaultStyle()
             if UIApplication.shared.visibleViewController?.navigationController != nil {
                 UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -58,7 +58,7 @@ public class APIS: NSObject {
             let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "myHistoryCC") as! HistoryCCViewController
             controller.isOfficer = true
             controller.fromAPI = true
-            let navigationController = UINavigationController(rootViewController: controller)
+            let navigationController = CustomNavigationController(rootViewController: controller)
             navigationController.defaultStyle()
             if UIApplication.shared.visibleViewController?.navigationController != nil {
                 UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -101,7 +101,7 @@ public class APIS: NSObject {
                 controller.channelContactCenter = "\(media!)"
                 controller.serviceIdCC = category == nil ? "" : "\(category!)"
             }
-            let navigationController = UINavigationController(rootViewController: controller)
+            let navigationController = CustomNavigationController(rootViewController: controller)
             navigationController.defaultStyle()
             if UIApplication.shared.visibleViewController?.navigationController != nil {
                 UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -133,7 +133,7 @@ public class APIS: NSObject {
             return
         }
         let controller = HistoryBroadcastViewController()
-        let navigationController = UINavigationController(rootViewController: controller)
+        let navigationController = CustomNavigationController(rootViewController: controller)
         navigationController.defaultStyle()
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -149,6 +149,7 @@ public class APIS: NSObject {
             return
         }
         let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactChatNav") as! UINavigationController
+        Utils.addBackground(view: navigationController.view)
         let vc = navigationController.topViewController as! ContactChatViewController
         vc.noUCList = true
         navigationController.defaultStyle()
@@ -167,7 +168,7 @@ public class APIS: NSObject {
         }
         let smartChatVC = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "chatGptVC") as! ChatGPTBotView
         smartChatVC.hidesBottomBarWhenPushed = true
-        let navigationController = UINavigationController(rootViewController: smartChatVC)
+        let navigationController = CustomNavigationController(rootViewController: smartChatVC)
         navigationController.defaultStyle()
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -190,7 +191,7 @@ public class APIS: NSObject {
         editorPersonalVC.hidesBottomBarWhenPushed = true
         editorPersonalVC.unique_l_pin = user!.pin
         editorPersonalVC.fromNotification = true
-        let navigationController = UINavigationController(rootViewController: editorPersonalVC)
+        let navigationController = CustomNavigationController(rootViewController: editorPersonalVC)
         navigationController.modalPresentationStyle = .fullScreen
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -201,7 +202,6 @@ public class APIS: NSObject {
         UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
-        navigationController.view.backgroundColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .black : .white
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
         } else {
@@ -216,7 +216,7 @@ public class APIS: NSObject {
             return
         }
         let callContact = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactSID")
-        let navigationController = UINavigationController(rootViewController: callContact)
+        let navigationController = CustomNavigationController(rootViewController: callContact)
         navigationController.defaultStyle()
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -231,7 +231,7 @@ public class APIS: NSObject {
             APIS.showChangeProfile()
             return
         }
-        let navigationController = UINavigationController(rootViewController: QmeraCreateStreamingViewController())
+        let navigationController = CustomNavigationController(rootViewController: QmeraCreateStreamingViewController())
         navigationController.defaultStyle()
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -246,7 +246,7 @@ public class APIS: NSObject {
 //            APIS.showChangeProfile()
 //            return
 //        }
-//        let navigationController = UINavigationController(rootViewController: CreateSeminarViewController())
+//        let navigationController = CustomNavigationController(rootViewController: CreateSeminarViewController())
 //        navigationController.defaultStyle()
 //        if UIApplication.shared.visibleViewController?.navigationController != nil {
 //            UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -263,7 +263,7 @@ public class APIS: NSObject {
         }
         let callContact = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactSID") as! ContactCallViewController
         callContact.onlyAudioOrVideo = 1
-        let navigationController = UINavigationController(rootViewController: callContact)
+        let navigationController = CustomNavigationController(rootViewController: callContact)
         navigationController.defaultStyle()
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -308,7 +308,7 @@ public class APIS: NSObject {
         }
         let callContact = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactSID") as! ContactCallViewController
         callContact.onlyAudioOrVideo = 2
-        let navigationController = UINavigationController(rootViewController: callContact)
+        let navigationController = CustomNavigationController(rootViewController: callContact)
         navigationController.defaultStyle()
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -374,6 +374,7 @@ public class APIS: NSObject {
             return
         }
         let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactChatNav") as! UINavigationController
+        Utils.addBackground(view: navigationController.view)
         navigationController.defaultStyle()
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -390,7 +391,7 @@ public class APIS: NSObject {
         }
         let editorStaredVC = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "staredVC") as! EditorStarMessages
         editorStaredVC.fromNotification = true
-        let navigationController = UINavigationController(rootViewController: editorStaredVC)
+        let navigationController = CustomNavigationController(rootViewController: editorStaredVC)
         navigationController.defaultStyle()
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -406,12 +407,13 @@ public class APIS: NSObject {
             return
         }
         let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "createGroupNav") as! UINavigationController
+        Utils.addBackground(view: controller.view)
         let vc = controller.topViewController as! GroupCreateViewController
         vc.isDismiss = { id in
             let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "groupDetailView") as! GroupDetailViewController
             controller.data = id
             controller.fromNotification = true
-            let navigationController = UINavigationController(rootViewController: controller)
+            let navigationController = CustomNavigationController(rootViewController: controller)
             navigationController.defaultStyle()
             DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: {
                 if UIApplication.shared.visibleViewController?.navigationController != nil {
@@ -436,6 +438,7 @@ public class APIS: NSObject {
             return
         }
         let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "addFriendNav") as! UINavigationController
+        Utils.addBackground(view: controller.view)
         controller.defaultStyle()
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(controller, animated: true, completion: nil)
@@ -452,7 +455,7 @@ public class APIS: NSObject {
         }
         let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
         controller.forceLogin = true
-        let navigationController = UINavigationController(rootViewController: controller)
+        let navigationController = CustomNavigationController(rootViewController: controller)
         navigationController.defaultStyle()
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -463,6 +466,7 @@ public class APIS: NSObject {
     
     public static func openSetting() {
         let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "settingNav") as! UINavigationController
+        Utils.addBackground(view: navigationController.view)
         navigationController.defaultStyle()
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -485,7 +489,7 @@ public class APIS: NSObject {
             dataImage["name"] = imageName
             NotificationCenter.default.post(name: NSNotification.Name(rawValue: "imageFBUpdate"), object: nil, userInfo: dataImage)
         }
-        let navigationController = UINavigationController(rootViewController: controller)
+        let navigationController = CustomNavigationController(rootViewController: controller)
         navigationController.defaultStyle()
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -502,7 +506,7 @@ public class APIS: NSObject {
         }
         let callContact = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactSID") as! ContactCallViewController
         callContact.startWhiteBoard = true
-        let navigationController = UINavigationController(rootViewController: callContact)
+        let navigationController = CustomNavigationController(rootViewController: callContact)
         navigationController.defaultStyle()
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -547,7 +551,7 @@ public class APIS: NSObject {
 //        }
 //        let callContact = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactSID") as! ContactCallViewController
 //        callContact.startSS = true
-//        let navigationController = UINavigationController(rootViewController: callContact)
+//        let navigationController = CustomNavigationController(rootViewController: callContact)
 //        navigationController.defaultStyle()
 //        if UIApplication.shared.visibleViewController?.navigationController != nil {
 //            UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -593,7 +597,7 @@ public class APIS: NSObject {
         let callContact = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactSID") as! ContactCallViewController
         callContact.startSS = true
         callContact.startWhiteBoard = true
-        let navigationController = UINavigationController(rootViewController: callContact)
+        let navigationController = CustomNavigationController(rootViewController: callContact)
         navigationController.defaultStyle()
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -692,7 +696,7 @@ public class APIS: NSObject {
         let controller = SetInternalCSAccount()
         controller.isSetCS = true
         controller.fromNotification = true
-        let navigationController = UINavigationController(rootViewController: controller)
+        let navigationController = CustomNavigationController(rootViewController: controller)
         navigationController.defaultStyle()
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -744,6 +748,5 @@ extension UINavigationController {
         UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         self.navigationBar.titleTextAttributes = textAttributes
-        self.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
     }
 }

+ 4 - 4
appbuilder-ios/NexilisLite/NexilisLite/Source/Extension.swift

@@ -1190,11 +1190,11 @@ extension UITextField {
     }
 }
 
-class ImageCache {
+public class ImageCache {
     private let cache = NSCache<NSString, UIImage>()
     private var observer: NSObjectProtocol!
 
-    static let shared = ImageCache()
+    public static let shared = ImageCache()
 
     private init() {
         // make sure to purge cache on memory pressure
@@ -1208,11 +1208,11 @@ class ImageCache {
         NotificationCenter.default.removeObserver(observer as Any)
     }
 
-    func image(forKey key: String) -> UIImage? {
+    public func image(forKey key: String) -> UIImage? {
         return cache.object(forKey: key as NSString)
     }
 
-    func save(image: UIImage, forKey key: String) {
+    public func save(image: UIImage, forKey key: String) {
         cache.setObject(image, forKey: key as NSString)
     }
 }

+ 1 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/FloatingButton/FloatingButton.swift

@@ -572,6 +572,7 @@ public class FloatingButton: UIView {
                 mySettingDelegate?.settingDelegate()
             } else {
                 let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "settingNav") as! UINavigationController
+                Utils.addBackground(view: navigationController.view)
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -582,7 +583,6 @@ public class FloatingButton: UIView {
                 UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
-                navigationController.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
                 UIApplication.shared.rootViewController?.present(navigationController, animated: true, completion: nil)
             }
             hideButton()

+ 1 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/IncomingThread.swift

@@ -355,7 +355,7 @@ class IncomingThread {
                 videoController.users.append(user!)
                 videoController.isAutoAccept = true
                 videoController.ticketId = complaintId
-                let navigationController = UINavigationController(rootViewController: videoController)
+                let navigationController = CustomNavigationController(rootViewController: videoController)
                 navigationController.modalPresentationStyle = .fullScreen
                 if UIApplication.shared.visibleViewController is UIAlertController {
                     let vc = UIApplication.shared.visibleViewController as! UIAlertController

+ 13 - 21
appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift

@@ -849,7 +849,7 @@ public class Nexilis: NSObject {
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
                 controller.forceLogin = true
-                let navigationController = UINavigationController(rootViewController: controller)
+                let navigationController = CustomNavigationController(rootViewController: controller)
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -860,7 +860,6 @@ public class Nexilis: NSObject {
                 UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
-                navigationController.view.backgroundColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .black : .white
                 if UIApplication.shared.visibleViewController?.navigationController != nil {
                     UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
                 } else {
@@ -893,7 +892,7 @@ public class Nexilis: NSObject {
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
                 controller.forceLogin = true
-                let navigationController = UINavigationController(rootViewController: controller)
+                let navigationController = CustomNavigationController(rootViewController: controller)
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -904,7 +903,6 @@ public class Nexilis: NSObject {
                 UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
-                navigationController.view.backgroundColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .black : .white
                 if UIApplication.shared.visibleViewController?.navigationController != nil {
                     UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
                 } else {
@@ -964,7 +962,7 @@ public class Nexilis: NSObject {
             alertChangeProfile.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
                 controller.forceLogin = true
-                let navigationController = UINavigationController(rootViewController: controller)
+                let navigationController = CustomNavigationController(rootViewController: controller)
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -975,7 +973,6 @@ public class Nexilis: NSObject {
                 UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
-                navigationController.view.backgroundColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .black : .white
                 let rootVC = UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController
                 if rootVC?.presentedViewController == nil {
                     rootVC?.present(navigationController, animated: true, completion: nil)
@@ -1991,7 +1988,7 @@ extension Nexilis: CallDelegate {
                 let videoController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "videoVCQmera") as! QmeraVideoViewController
                 videoController.fPin = String(deviceId)
                 videoController.isInisiator = false
-                let navigationController = UINavigationController(rootViewController: videoController)
+                let navigationController = CustomNavigationController(rootViewController: videoController)
                 navigationController.modalPresentationStyle = .fullScreen
                 if UIApplication.shared.visibleViewController is UIAlertController {
                     let vc = UIApplication.shared.visibleViewController as! UIAlertController
@@ -2488,7 +2485,7 @@ extension Nexilis: MessageDelegate {
                                         editorPersonalVC.complaintId = complaintId
                                         editorPersonalVC.channelContactCenter = message.getBody(key: CoreMessage_TMessageKey.CHANNEL)
                                         editorPersonalVC.fPinContacCenter = message.getBody(key: CoreMessage_TMessageKey.L_PIN)
-                                        let navigationController = UINavigationController(rootViewController: editorPersonalVC)
+                                        let navigationController = CustomNavigationController(rootViewController: editorPersonalVC)
                                         navigationController.modalPresentationStyle = .fullScreen
                                         navigationController.navigationBar.tintColor = .white
                                         navigationController.navigationBar.barTintColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -2499,7 +2496,6 @@ extension Nexilis: MessageDelegate {
                                         UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                                         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                                         navigationController.navigationBar.titleTextAttributes = textAttributes
-                                        navigationController.view.backgroundColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .black : .white
                                         if UIApplication.shared.visibleViewController?.navigationController != nil {
                                             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
                                         } else {
@@ -2515,7 +2511,7 @@ extension Nexilis: MessageDelegate {
                                                 controller.isOutgoing = true
                                                 controller.ticketId = complaintId
                                                 controller.modalPresentationStyle = .overCurrentContext
-                                                let navigationController = UINavigationController(rootViewController: controller)
+                                                let navigationController = CustomNavigationController(rootViewController: controller)
                                                 navigationController.modalPresentationStyle = .fullScreen
                                                 if UIApplication.shared.visibleViewController?.navigationController != nil {
                                                     UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -2527,7 +2523,7 @@ extension Nexilis: MessageDelegate {
                                                 videoVC.fPin = message.getBody(key: CoreMessage_TMessageKey.L_PIN)
                                                 videoVC.users.append(User.getData(pin: message.getBody(key: CoreMessage_TMessageKey.L_PIN))!)
                                                 videoVC.ticketId = complaintId
-                                                let navigationController = UINavigationController(rootViewController: videoVC)
+                                                let navigationController = CustomNavigationController(rootViewController: videoVC)
                                                 navigationController.modalPresentationStyle = .fullScreen
                                                 if UIApplication.shared.visibleViewController?.navigationController != nil {
                                                     UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -2885,7 +2881,7 @@ extension Nexilis: MessageDelegate {
                                             editorPersonalVC.onGoingCC = true
                                             editorPersonalVC.isRequestContactCenter = false
                                             editorPersonalVC.users = user
-                                            let navigationController = UINavigationController(rootViewController: editorPersonalVC)
+                                            let navigationController = CustomNavigationController(rootViewController: editorPersonalVC)
                                             navigationController.modalPresentationStyle = .fullScreen
                                             navigationController.navigationBar.tintColor = .white
                                             navigationController.navigationBar.barTintColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -2896,7 +2892,6 @@ extension Nexilis: MessageDelegate {
                                             UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                                             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                                             navigationController.navigationBar.titleTextAttributes = textAttributes
-                                            navigationController.view.backgroundColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .black : .white
                                             if UIApplication.shared.visibleViewController?.navigationController != nil {
                                                 UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
                                             } else {
@@ -2912,7 +2907,7 @@ extension Nexilis: MessageDelegate {
                                                     controller.isOutgoing = false
                                                     controller.ticketId = complaintId
                                                     controller.modalPresentationStyle = .overCurrentContext
-                                                    let navigationController = UINavigationController(rootViewController: controller)
+                                                    let navigationController = CustomNavigationController(rootViewController: controller)
                                                     navigationController.modalPresentationStyle = .fullScreen
                                                     if UIApplication.shared.visibleViewController?.navigationController != nil {
                                                         UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -2926,7 +2921,7 @@ extension Nexilis: MessageDelegate {
                                                     videoVC.ticketId = complaintId
                                                     videoVC.isInisiator = false
                                                     videoVC.isAutoAccept = true
-                                                    let navigationController = UINavigationController(rootViewController: videoVC)
+                                                    let navigationController = CustomNavigationController(rootViewController: videoVC)
                                                     navigationController.modalPresentationStyle = .fullScreen
                                                     if UIApplication.shared.visibleViewController?.navigationController != nil {
                                                         UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
@@ -3326,7 +3321,7 @@ extension Nexilis: MessageDelegate {
                                     alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                                         let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
                                         controller.forceLogin = true
-                                        let navigationController = UINavigationController(rootViewController: controller)
+                                        let navigationController = CustomNavigationController(rootViewController: controller)
                                         navigationController.modalPresentationStyle = .fullScreen
                                         navigationController.navigationBar.tintColor = .white
                                         navigationController.navigationBar.barTintColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -3337,7 +3332,6 @@ extension Nexilis: MessageDelegate {
                                         UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                                         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                                         navigationController.navigationBar.titleTextAttributes = textAttributes
-                                        navigationController.view.backgroundColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .black : .white
                                         if UIApplication.shared.visibleViewController?.navigationController != nil {
                                             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
                                         } else {
@@ -3369,7 +3363,7 @@ extension Nexilis: MessageDelegate {
                                     editorPersonalVC.onGoingCC = true
                                     editorPersonalVC.isRequestContactCenter = false
                                 }
-                                let navigationController = UINavigationController(rootViewController: editorPersonalVC)
+                                let navigationController = CustomNavigationController(rootViewController: editorPersonalVC)
                                 navigationController.modalPresentationStyle = .fullScreen
                                 navigationController.navigationBar.tintColor = .white
                                 navigationController.navigationBar.barTintColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -3380,7 +3374,6 @@ extension Nexilis: MessageDelegate {
                                 UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                                 navigationController.navigationBar.titleTextAttributes = textAttributes
-                                navigationController.view.backgroundColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .black : .white
                                 if UIApplication.shared.visibleViewController?.navigationController != nil {
                                     UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
                                 } else {
@@ -3462,7 +3455,7 @@ extension Nexilis: MessageDelegate {
                                 editorGroupVC.hidesBottomBarWhenPushed = true
                                 editorGroupVC.unique_l_pin = threadIdentifier
                                 editorGroupVC.fromNotification = true
-                                let navigationController = UINavigationController(rootViewController: editorGroupVC)
+                                let navigationController = CustomNavigationController(rootViewController: editorGroupVC)
                                 navigationController.modalPresentationStyle = .fullScreen
                                 navigationController.navigationBar.tintColor = .white
                                 navigationController.navigationBar.barTintColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -3473,7 +3466,6 @@ extension Nexilis: MessageDelegate {
                                 UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                                 navigationController.navigationBar.titleTextAttributes = textAttributes
-                                navigationController.view.backgroundColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .black : .white
                                 if UIApplication.shared.visibleViewController?.navigationController != nil {
                                     UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
                                 } else {

+ 116 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/Utils.swift

@@ -162,6 +162,10 @@ public final class Utils {
         UserDefaults.standard.string(forKey: "cookies_mobile") ?? ""
     }
     
+    static func getBackground() -> String {
+        return UserDefaults.standard.string(forKey: "app_builder_background") ?? ""
+    }
+    
     static func setBackgroundLight(value: String) {
         UserDefaults.standard.set(value, forKey: "app_builder_background_light")
     }
@@ -451,6 +455,96 @@ public final class Utils {
         }
         return iAscii
     }
+    
+    public static func addBackground(view: UIView?) {
+        do {
+            if let view = view {
+                DispatchQueue.global().async {
+                    DispatchQueue.main.async {
+                        let listBg = Utils.getBackgroundLight().isEmpty && Utils.getBackgroundDark().isEmpty ? Utils.getBackground() :
+                        UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? Utils.getBackgroundDark() : Utils.getBackgroundLight()
+                        if listBg.isEmpty {
+                           return
+                        }
+                        var bgChoosen = ""
+                        let arrayBg = listBg.split(separator: ",")
+                        bgChoosen = String(arrayBg[Int.random(in: 0..<arrayBg.count)])
+                        let urlString = Utils.getURLBase() + "get_file_from_path?img=" + bgChoosen
+                        if let cachedImage = ImageCache.shared.image(forKey: urlString) {
+                            DispatchQueue.main.async() {
+                                let backgroundImage = cachedImage
+                                let backgroundImageView = UIImageView(frame: view.bounds)
+                                backgroundImageView.image = backgroundImage
+                                backgroundImageView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+                                view.insertSubview(backgroundImageView, at: 0)
+                                view.sendSubviewToBack(backgroundImageView)
+                            }
+                            return
+                        }
+                        Utils.fetchDataWithCookiesAndUserAgent(from: URL(string: urlString)!) { data, response, error in
+                            guard let data = data, error == nil else { return }
+                            // always update the UI from the main thread
+                            DispatchQueue.main.async() {
+                                if UIImage(data: data) != nil {
+                                    let backgroundImage = UIImage(data: data)!
+                                    let backgroundImageView = UIImageView(frame: view.bounds)
+                                    backgroundImageView.image = backgroundImage
+                                    backgroundImageView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+                                    view.insertSubview(backgroundImageView, at: 0)
+                                    view.sendSubviewToBack(backgroundImageView)
+                                    ImageCache.shared.save(image: UIImage(data: data)!, forKey: urlString)
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        } catch {
+            
+        }
+    }
+    
+    public static func randomizeBackground(view: UIView?) {
+        do {
+            if let view = view {
+                DispatchQueue.global().async {
+                    DispatchQueue.main.async {
+                        let listBg = Utils.getBackgroundLight().isEmpty && Utils.getBackgroundDark().isEmpty ? Utils.getBackground() :
+                        UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? Utils.getBackgroundDark() : Utils.getBackgroundLight()
+                        if listBg.isEmpty {
+                           return
+                        }
+                        var bgChoosen = ""
+                        let arrayBg = listBg.split(separator: ",")
+                        bgChoosen = String(arrayBg[Int.random(in: 0..<arrayBg.count)])
+                        let urlString = Utils.getURLBase() + "get_file_from_path?img=" + bgChoosen
+                        if let cachedImage = ImageCache.shared.image(forKey: urlString) {
+                            DispatchQueue.main.async() {
+                                let backgroundImage = cachedImage
+                                let backgroundImageView = view.subviews[0] as? UIImageView
+                                backgroundImageView?.image = backgroundImage
+                            }
+                            return
+                        }
+                        Utils.fetchDataWithCookiesAndUserAgent(from: URL(string: urlString)!) { data, response, error in
+                            guard let data = data, error == nil else { return }
+                            // always update the UI from the main thread
+                            DispatchQueue.main.async() {
+                                if UIImage(data: data) != nil {
+                                    let backgroundImage = UIImage(data: data)!
+                                    let backgroundImageView = view.subviews[0] as? UIImageView
+                                    backgroundImageView?.image = backgroundImage
+                                    ImageCache.shared.save(image: UIImage(data: data)!, forKey: urlString)
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        } catch {
+            
+        }
+    }
 }
 public extension UIImage {
     var jpeg: Data? { jpegData(compressionQuality: 1) }  // QUALITY min = 0 / max = 1
@@ -502,3 +596,25 @@ public extension UIDevice {
         }
     }
 }
+
+public class CustomNavigationController: UINavigationController {
+    
+    public override func viewDidLoad() {
+        super.viewDidLoad()
+        self.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
+        Utils.addBackground(view: self.view)
+    }
+    
+    public override func viewDidDisappear(_ animated: Bool) {
+        super.viewDidDisappear(animated)
+        Utils.randomizeBackground(view: self.view)
+    }
+    
+    public override init(rootViewController: UIViewController) {
+        super.init(rootViewController: rootViewController)
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+}

+ 1 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraAudioConference.swift

@@ -305,7 +305,7 @@ class QmeraAudioConference: UIViewController {
             }
         }
         controller.selectedUser.append(contentsOf: users)
-        present(UINavigationController(rootViewController: controller), animated: true, completion: nil)
+        present(CustomNavigationController(rootViewController: controller), animated: true, completion: nil)
     }
     
     @objc func didEnd(sender: Any?) {

+ 2 - 3
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraAudioViewController.swift

@@ -441,7 +441,7 @@ class QmeraAudioViewController: UIViewController {
         editorPersonalVC.isRequestContactCenter = false
         editorPersonalVC.users = users
         editorPersonalVC.fromVCAC = true
-        let navigationController = UINavigationController(rootViewController: editorPersonalVC)
+        let navigationController = CustomNavigationController(rootViewController: editorPersonalVC)
         navigationController.modalPresentationStyle = .overCurrentContext
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -452,7 +452,6 @@ class QmeraAudioViewController: UIViewController {
         UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
-        navigationController.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
         } else {
@@ -557,7 +556,7 @@ class QmeraAudioViewController: UIViewController {
             }
         }
         controller.selectedUser.append(contentsOf: users)
-        present(UINavigationController(rootViewController: controller), animated: true, completion: nil)
+        present(CustomNavigationController(rootViewController: controller), animated: true, completion: nil)
     }
     
     @objc func didPressEnd(sender: Any?) {

+ 1 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraCallContactViewController.swift

@@ -77,6 +77,7 @@ class QmeraCallContactViewController: UITableViewController {
     
     @objc func addFriend(sender: UIBarButtonItem) {
         let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "addFriendNav") as! UINavigationController
+        Utils.addBackground(view: controller.view)
         if let vc = controller.viewControllers.first as? AddFriendTableViewController {
             vc.isDismiss = {
                 self.users.removeAll()

+ 2 - 3
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraVideoViewController.swift

@@ -595,7 +595,7 @@ class QmeraVideoViewController: UIViewController {
         editorPersonalVC.isRequestContactCenter = false
         editorPersonalVC.users = users
         editorPersonalVC.fromVCAC = true
-        let navigationController = UINavigationController(rootViewController: editorPersonalVC)
+        let navigationController = CustomNavigationController(rootViewController: editorPersonalVC)
         navigationController.modalPresentationStyle = .overCurrentContext
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -606,7 +606,6 @@ class QmeraVideoViewController: UIViewController {
         UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
-        navigationController.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
         if UIApplication.shared.visibleViewController?.navigationController != nil {
             UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
         } else {
@@ -893,7 +892,7 @@ class QmeraVideoViewController: UIViewController {
                     }
                 }
             }
-            present(UINavigationController(rootViewController: contactViewController), animated: true, completion: nil)
+            present(CustomNavigationController(rootViewController: contactViewController), animated: true, completion: nil)
         }
     }
     

+ 3 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorGroup.swift

@@ -141,6 +141,7 @@ public class EditorGroup: UIViewController {
     public override func viewDidLoad() {
         super.viewDidLoad()
 //        navigationController?.navigationBar.topItem?.title = ""
+        Utils.addBackground(view: contactChatNav.view)
         
         viewButton.layer.shadowColor = self.traitCollection.userInterfaceStyle == .dark ? UIColor.white.cgColor : UIColor.gray.cgColor
         viewButton.layer.shadowOpacity = 1
@@ -1760,7 +1761,7 @@ extension EditorGroup: UIDocumentPickerDelegate, DocumentPickerDelegate, QLPrevi
         if (document != nil) {
             self.previewItem = (document as! [URL])[0] as NSURL
             let previewController = QLPreviewController()
-            let navController = UINavigationController(rootViewController: previewController)
+            let navController = CustomNavigationController(rootViewController: previewController)
             let leftBarButton = navigationQLPreviewDocument(title: "Cancel".localized(), style: .plain, target: self, action: #selector(cancelDocumentPreview))
             let rightBarButton = navigationQLPreviewDocument(title: "Send".localized(), style: .done, target: self, action: #selector(sendDocument))
 //            leftBarButton.tintColor = .white
@@ -3111,7 +3112,7 @@ extension EditorGroup: UITableViewDelegate, UITableViewDataSource {
                             (streamingController as! CreateSeminarViewController).data = json
                     }
                 }
-                let streamingNav = UINavigationController(rootViewController: streamingController)
+                let streamingNav = CustomNavigationController(rootViewController: streamingController)
                 streamingNav.modalPresentationStyle = .custom
                 streamingNav.navigationBar.tintColor = .white
                 streamingNav.navigationBar.barTintColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor

+ 3 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift

@@ -158,6 +158,7 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
     public override func viewDidLoad() {
         super.viewDidLoad()
 //        navigationController?.navigationBar.topItem?.title = ""
+        Utils.addBackground(view: contactChatNav.view)
         
         viewButton.layer.shadowColor = self.traitCollection.userInterfaceStyle == .dark ? UIColor.white.cgColor : UIColor.gray.cgColor
         viewButton.layer.shadowOpacity = 1
@@ -3063,7 +3064,7 @@ extension EditorPersonal: UIDocumentPickerDelegate, DocumentPickerDelegate, QLPr
         if (document != nil) {
             self.previewItem = (document as! [URL])[0] as NSURL
             let previewController = QLPreviewController()
-            let navController = UINavigationController(rootViewController: previewController)
+            let navController = CustomNavigationController(rootViewController: previewController)
             let leftBarButton = navigationQLPreviewDocument(title: "Cancel".localized(), style: .plain, target: self, action: #selector(cancelDocumentPreview))
             let rightBarButton = navigationQLPreviewDocument(title: "Send".localized(), style: .done, target: self, action: #selector(sendDocument))
 //            leftBarButton.tintColor = .white
@@ -4238,7 +4239,7 @@ extension EditorPersonal: UITableViewDelegate, UITableViewDataSource {
                             }
                         }
                     }
-                let streamingNav = UINavigationController(rootViewController: streamingController)
+                let streamingNav = CustomNavigationController(rootViewController: streamingController)
                 streamingNav.modalPresentationStyle = .custom
                 streamingNav.navigationBar.tintColor = .white
                 streamingNav.navigationBar.barTintColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor

+ 2 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorStarMessages.swift

@@ -1329,6 +1329,7 @@ public class EditorStarMessages: UIViewController, UITableViewDataSource, UITabl
         })
         let forward = UIAction(title: "Forward".localized(), image: UIImage(systemName: "arrowshape.turn.up.right.fill"), handler: {(_) in
             let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactChatNav") as! UINavigationController
+            Utils.addBackground(view: navigationController.view)
             navigationController.modalPresentationStyle = .custom
             navigationController.navigationBar.tintColor = .white
             navigationController.navigationBar.barTintColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
@@ -1339,7 +1340,6 @@ public class EditorStarMessages: UIViewController, UITableViewDataSource, UITabl
             UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
             navigationController.navigationBar.titleTextAttributes = textAttributes
-            navigationController.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
             if let controller = navigationController.viewControllers.first as? ContactChatViewController {
                 controller.isChooser = { [weak self] scope, pin in
                     if scope == "3" {
@@ -1488,7 +1488,7 @@ public class EditorStarMessages: UIViewController, UITableViewDataSource, UITabl
                     }
                     streamingController.data = json
                 }
-                let streamingNav = UINavigationController(rootViewController: streamingController)
+                let streamingNav = CustomNavigationController(rootViewController: streamingController)
                 streamingNav.modalPresentationStyle = .custom
                 streamingNav.navigationBar.barTintColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
                 streamingNav.navigationBar.tintColor = .white

+ 1 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/ListGroupImages.swift

@@ -530,6 +530,7 @@ class ListGroupImages: UIViewController, UITableViewDataSource, UITableViewDeleg
                 dataMessages.append(tempDataMessages[i].dataMessage)
             }
             let contactChatNav = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactChatNav") as! UINavigationController
+            Utils.addBackground(view: contactChatNav.view)
             contactChatNav.modalPresentationStyle = .custom
             contactChatNav.navigationBar.tintColor = .white
             contactChatNav.navigationBar.barTintColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor

+ 1 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Contact/ContactCallViewController.swift

@@ -103,6 +103,7 @@ class ContactCallViewController: UIViewController {
     
     @objc func addFriend(sender: UIBarButtonItem) {
         let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "addFriendNav") as! UINavigationController
+        Utils.addBackground(view: controller.view)
         if let vc = controller.viewControllers.first as? AddFriendTableViewController {
             vc.isDismiss = {
                 self.getData()

+ 1 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/BroadcastMembersTableViewController.swift

@@ -98,6 +98,7 @@ class BroadcastMembersTableViewController: UITableViewController, UISearchContro
     
     @objc func addFriend(sender: UIBarButtonItem) {
         let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "addFriendNav") as! UINavigationController
+        Utils.addBackground(view: controller.view)
         if let vc = controller.viewControllers.first as? AddFriendTableViewController {
             vc.isDismiss = {
                 self.contacts.removeAll()

+ 3 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ContactChatViewController.swift

@@ -98,6 +98,7 @@ class ContactChatViewController: UITableViewController {
         let childrenMenu : [UIAction] = [
             UIAction(title: "Create Group".localized(), image: UIImage(systemName: "person.and.person"), handler: {[weak self](_) in
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "createGroupNav") as! UINavigationController
+                Utils.addBackground(view: controller.view)
                 let vc = controller.topViewController as! GroupCreateViewController
                 vc.isDismiss = { id in
                     self?.groupMap.removeAll()
@@ -127,7 +128,7 @@ class ContactChatViewController: UITableViewController {
 //                self?.navigationController?.present(controller, animated: true, completion: nil)
 //            }))
 //            childrenMenu.append(UIAction(title: "Live Streaming".localized(), image: UIImage(systemName: "video.bubble.left"), handler: {[weak self](_) in
-//                let navigationController = UINavigationController(rootViewController: QmeraCreateStreamingViewController())
+//                let navigationController = CustomNavigationController(rootViewController: QmeraCreateStreamingViewController())
 //                navigationController.modalPresentationStyle = .fullScreen
 //                navigationController.navigationBar.tintColor = .white
 //                navigationController.navigationBar.barTintColor = .mainColor
@@ -239,6 +240,7 @@ class ContactChatViewController: UITableViewController {
     
     @objc func addFriend(sender: UIBarButtonItem) {
         let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "addFriendNav") as! UINavigationController
+        Utils.addBackground(view: controller.view)
         if let vc = controller.viewControllers.first as? AddFriendTableViewController {
             vc.isDismiss = {
                 self.getContacts {

+ 4 - 4
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/GroupDetailViewController.swift

@@ -199,7 +199,7 @@ class GroupDetailViewController: UITableViewController {
         controller.isDismiss = {
             self.reload()
         }
-        let navController = UINavigationController(rootViewController: controller)
+        let navController = CustomNavigationController(rootViewController: controller)
         let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white, NSAttributedString.Key.font : UIFont.systemFont(ofSize: 16)]
         UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
@@ -300,7 +300,7 @@ class GroupDetailViewController: UITableViewController {
                 controller.isDismiss = {
                     self.reload()
                 }
-                let navController = UINavigationController(rootViewController: controller)
+                let navController = CustomNavigationController(rootViewController: controller)
                 let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white, NSAttributedString.Key.font : UIFont.systemFont(ofSize: 16)]
                 UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
@@ -344,7 +344,7 @@ class GroupDetailViewController: UITableViewController {
                 controller.isDismiss = {
                     self.reload()
                 }
-                let navController = UINavigationController(rootViewController: controller)
+                let navController = CustomNavigationController(rootViewController: controller)
                 let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white, NSAttributedString.Key.font : UIFont.systemFont(ofSize: 16)]
                 UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
@@ -513,7 +513,7 @@ class GroupDetailViewController: UITableViewController {
                 controller.isDismiss = {
                     self.reload()
                 }
-                let navController = UINavigationController(rootViewController: controller)
+                let navController = CustomNavigationController(rootViewController: controller)
                 let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white, NSAttributedString.Key.font : UIFont.systemFont(ofSize: 16)]
                 UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]

+ 2 - 4
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/SettingTableViewController.swift

@@ -556,7 +556,7 @@ public class SettingTableViewController: UITableViewController, UIGestureRecogni
                 return
             }
             let controller = ScannerViewController()
-            let navigationController = UINavigationController(rootViewController: controller)
+            let navigationController = CustomNavigationController(rootViewController: controller)
             navigationController.navigationBar.tintColor = .white
             navigationController.navigationBar.barTintColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
             navigationController.navigationBar.isTranslucent = false
@@ -564,7 +564,6 @@ public class SettingTableViewController: UITableViewController, UIGestureRecogni
             UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
             navigationController.navigationBar.titleTextAttributes = textAttributes
-            navigationController.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
             navigationController.navigationBar.overrideUserInterfaceStyle = .dark
             navigationController.navigationBar.barStyle = .black
             navigationController.modalPresentationStyle = .custom
@@ -574,7 +573,7 @@ public class SettingTableViewController: UITableViewController, UIGestureRecogni
             if item.title != "Notification Message(s)".localized() {
                 controller.isPersonal = false
             }
-            let navigationController = UINavigationController(rootViewController: controller)
+            let navigationController = CustomNavigationController(rootViewController: controller)
             navigationController.navigationBar.tintColor = .white
             navigationController.navigationBar.barTintColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
             navigationController.navigationBar.isTranslucent = false
@@ -584,7 +583,6 @@ public class SettingTableViewController: UITableViewController, UIGestureRecogni
             UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
             navigationController.navigationBar.titleTextAttributes = textAttributes
-            navigationController.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
             self.present(navigationController, animated: true)
         } else if item.title == "Backup & Restore".localized() {
             let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "backupRestore") as! BackupRestoreView

+ 1 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Streaming/SeminarViewController.swift

@@ -528,6 +528,7 @@ class SeminarViewController: UIViewController {
 
     @objc func showListViewer(sender: Any?){
         let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "seminarListNav") as! UINavigationController
+        Utils.addBackground(view: controller.view)
         if let vc = controller.viewControllers.first as? SeminarListViewController {
             vc.data = viewers
             vc.makeSpeaker = { viewer in