From 93783809cfb18ae273bd3a78c8dbca91facd10d9 Mon Sep 17 00:00:00 2001
From: 无故事王国 <841720330@qq.com>
Date: 星期三, 29 十一月 2023 11:49:49 +0800
Subject: [PATCH] fix bug

---
 WanPai/Base/BaseNav.swift |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/WanPai/Base/BaseNav.swift b/WanPai/Base/BaseNav.swift
index 4b48693..a0a2bc7 100644
--- a/WanPai/Base/BaseNav.swift
+++ b/WanPai/Base/BaseNav.swift
@@ -10,7 +10,7 @@
 
 class BaseNav: UINavigationController,UINavigationControllerDelegate {
     
-    private var popDelegate: UIGestureRecognizerDelegate?
+//    private var popDelegate: UIGestureRecognizerDelegate?
 
 
         /// 需要透明Nav的VC
@@ -26,9 +26,10 @@
         self.navigationBar.shadowImage = UIImage()
         self.navigationBar.isTranslucent = true
         self.delegate = self
-        self.popDelegate = self.interactivePopGestureRecognizer?.delegate
-        
-        
+//        self.popDelegate = self.interactivePopGestureRecognizer?.delegate
+		self.interactivePopGestureRecognizer?.delegate = self
+
+
         if #available(iOS 15.0, *) {
             let scrollBar = UINavigationBarAppearance()
             scrollBar.configureWithOpaqueBackground()
@@ -50,8 +51,6 @@
             
             navigationBar.scrollEdgeAppearance = scrollBar //顶部透明
             navigationBar.standardAppearance = standardBar
-            
-            
         }else {
             navigationBar.titleTextAttributes = [.foregroundColor:UIColor.white,.font:Def_NavFont]
             navigationBar.isTranslucent = true
@@ -61,7 +60,6 @@
     }
     
     open func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
-
         let status = lucencyVCs.contains(where: {$0 == viewController.classForCoder})
 		if (navigationController.viewControllers.count == 1 || status) && !(viewController is WelfareVC){
             if #available(iOS 15.0, *) {
@@ -84,7 +82,7 @@
         //侧滑
     public func navigationController(_ navigationController: UINavigationController, didShow viewController: UIViewController, animated: Bool) {
         if  viewController == self.viewControllers[0] {
-            self.interactivePopGestureRecognizer!.delegate = self.popDelegate
+            self.interactivePopGestureRecognizer!.delegate = self
         }else{
             self.interactivePopGestureRecognizer!.delegate = nil
         }

--
Gitblit v1.7.1