From 158f3707711ad4be78a55dc73a98aa1c9acda0dd Mon Sep 17 00:00:00 2001
From: 无故事王国 <841720330@qq.com>
Date: 星期三, 25 十月 2023 09:42:21 +0800
Subject: [PATCH] fix Bug

---
 BrokerDriver/Base/BaseNavigationController.swift |   33 ++++++++++++++++++++++++---------
 1 files changed, 24 insertions(+), 9 deletions(-)

diff --git a/BrokerDriver/Base/BaseNavigationController.swift b/BrokerDriver/Base/BaseNavigationController.swift
index c121999..7dc201f 100644
--- a/BrokerDriver/Base/BaseNavigationController.swift
+++ b/BrokerDriver/Base/BaseNavigationController.swift
@@ -17,20 +17,35 @@
         self.navigationBar.titleTextAttributes = [.font:UIFont.systemFont(ofSize: 18, weight: .medium), .foregroundColor:UIColor.black]
         self.navigationBar.tintColor = UIColor.black
         self.navigationBar.shadowImage = UIImage()
-        self.navigationBar.isTranslucent = false
+        self.navigationBar.isTranslucent = true
         self.delegate = self
         self.popDelegate = self.interactivePopGestureRecognizer?.delegate
 
 
         if #available(iOS 15.0, *) {
-            let bar = UINavigationBarAppearance()
-            bar.configureWithOpaqueBackground() //消除15的黑框
-            bar.backgroundEffect = nil
-            bar.shadowColor = nil
-            bar.titleTextAttributes = [.foregroundColor:Def_NavFontColor,.font:Def_NavFont]
-            bar.backgroundColor = UIColor.white
-            navigationBar.scrollEdgeAppearance = bar //顶部透明
-            navigationBar.standardAppearance = bar
+            let scrollBar = UINavigationBarAppearance()
+            scrollBar.configureWithOpaqueBackground()
+            scrollBar.backgroundEffect = nil
+            scrollBar.shadowColor = nil
+            scrollBar.titleTextAttributes = [.foregroundColor:Def_NavFontColor,.font:Def_NavFont]
+            scrollBar.backgroundColor = UIColor.clear
+
+
+            let img = UIImage.jq_gradient([UIColor.black.withAlphaComponent(0.4),UIColor.clear], size: CGSize(width: JQ_ScreenW, height: JQ_NavBarHeight), radius: 0, locations: [0,1], direction: .vertical)
+
+            let standardBar = UINavigationBarAppearance()
+            standardBar.configureWithOpaqueBackground()
+            standardBar.backgroundEffect = nil
+            standardBar.shadowColor = nil
+            standardBar.shadowImage = nil
+            standardBar.titleTextAttributes = [.foregroundColor:Def_NavFontColor,.font:Def_NavFont]
+            standardBar.backgroundColor = UIColor.clear
+            standardBar.backgroundImage = img
+
+            navigationBar.scrollEdgeAppearance = scrollBar //顶部透明
+            navigationBar.standardAppearance = standardBar
+
+
         }else {
             navigationBar.titleTextAttributes = [.foregroundColor:Def_NavFontColor,.font:Def_NavFont]
         }

--
Gitblit v1.7.1