iOS26侧滑优化
authorliangzhenying <867174124@qq.com>
Sat, 28 Feb 2026 08:49:14 +0000 (16:49 +0800)
committerliangzhenying <867174124@qq.com>
Sat, 28 Feb 2026 08:49:14 +0000 (16:49 +0800)
15 files changed:
ShenYin/ShenYin/Sdk/DcSdk/VC/AiFunctionVC.swift
ShenYin/ShenYin/Sdk/DcSdk/VC/DcChinese2EnglishVC.swift
ShenYin/ShenYin/Sdk/DcSdk/VC/DcDialogTranslateVC.swift
ShenYin/ShenYin/Sdk/DcSdk/VC/DcStereoCallVC.swift
ShenYin/ShenYin/Sdk/DcSdk/VC/DcTctyVC.swift
ShenYin/ShenYin/Sdk/DcSdk/VC/DcXclyVC.swift
ShenYin/ShenYin/Sdk/JoySdk/VC/JoyCallingRecordVC.swift
ShenYin/ShenYin/Sdk/JoySdk/VC/JoyChinese2EnglishVC.swift
ShenYin/ShenYin/Sdk/JoySdk/VC/JoyDialogTranlateVC.swift
ShenYin/ShenYin/Sdk/JoySdk/VC/JoyStereoCallVC.swift
ShenYin/ShenYin/Sdk/JoySdk/VC/JoyTctyVC.swift
ShenYin/ShenYin/Sdk/JoySdk/VC/JoyXclyVC.swift
ShenYin/ShenYin/UI/Base/BaseNC.swift
ShenYin/ShenYin/UI/Base/BaseVC.swift
ShenYin/ShenYin/UI/Login/Controller/Binding/BindingPhoneVC.swift

index 1d67bf2..5c1787e 100644 (file)
@@ -107,9 +107,11 @@ fileprivate class AiFunctionHeadView: BaseView {
         didSet{
             if enable {
                 icon.connetedView.isHidden = false
+                bottonView.alpha = 1
             }
             else{
                 icon.connetedView.isHidden = true
+                bottonView.alpha = 0.5
             }
         }
     }
index a50b38c..edc8d08 100644 (file)
@@ -73,14 +73,14 @@ class DcChinese2EnglishVC:BaseVC{
     }
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = false
+        disablePopGesture()
         
         PcmSound.sharedInstance().delegate = sdk
         CCAiManager.preparePlayBlueTooth()
     }
     override func viewDidDisappear(_ animated: Bool) {
         super.viewDidDisappear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        enablePopGesture()
         CCAiManager.preparePlayBlueTooth()
     }
     override func navleftViewTapped() {
index c763011..f8a106e 100644 (file)
@@ -84,11 +84,11 @@ class DcDialogTranslateVC:BaseVC{
     }
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = false
+        disablePopGesture()
     }
     override func viewDidDisappear(_ animated: Bool) {
         super.viewDidDisappear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        enablePopGesture()
     }
     override func navleftViewTapped() {
         CCAiManager.stopPlay()
index d240c47..6f78a3f 100644 (file)
@@ -171,11 +171,11 @@ class DcStereoCallVC:BaseVC{
     }
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = false
+        disablePopGesture()
     }
     override func viewDidDisappear(_ animated: Bool) {
         super.viewDidDisappear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        enablePopGesture()
     }
     override func navleftViewTapped() {
         if toolBar.recordBtn.isSelected {
index 3c04a30..ea5d862 100644 (file)
@@ -117,14 +117,14 @@ class DcTctyVC:BaseVC{
     
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = false
+        disablePopGesture()
         
         PcmSound.sharedInstance().delegate = sdk
         CCAiManager.preparePlayBlueTooth()
     }
     override func viewDidDisappear(_ animated: Bool) {
         super.viewDidDisappear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        enablePopGesture()
         CCAiManager.stopPlay()
     }
     override func navleftViewTapped() {
index 434a261..07c055c 100644 (file)
@@ -119,11 +119,11 @@ class DcXclyVC:BaseVC{
     }
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = false
+        disablePopGesture()
     }
     override func viewDidDisappear(_ animated: Bool) {
         super.viewDidDisappear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        enablePopGesture()
     }
     override func navleftViewTapped() {
         if toolBar.recordBtn.isSelected {
index 29e4bba..9e98d2f 100644 (file)
@@ -130,11 +130,11 @@ class JoyCallingRecordVC:BaseVC{
 
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = false
+        disablePopGesture()
     }
     override func viewDidDisappear(_ animated: Bool) {
         super.viewDidDisappear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        enablePopGesture()
     }
     override func navleftViewTapped() {
         if toolBar.recordBtn.isSelected {
index f8e9bfe..1bdb328 100644 (file)
@@ -73,14 +73,14 @@ class JoyChinese2EnglishVC:BaseVC{
     }
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = false
+        disablePopGesture()
         
         PcmSound.sharedInstance().delegate = sdk
         CCAiManager.preparePlayBlueTooth()
     }
     override func viewDidDisappear(_ animated: Bool) {
         super.viewDidDisappear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        enablePopGesture()
         CCAiManager.preparePlayBlueTooth()
     }
     override func navleftViewTapped() {
index 5fde931..c8fb86a 100644 (file)
@@ -86,11 +86,11 @@ class JoyDialogTranslateVC:BaseVC{
     }
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = false
+        disablePopGesture()
     }
     override func viewDidDisappear(_ animated: Bool) {
         super.viewDidDisappear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        enablePopGesture()
     }
     override func navleftViewTapped() {
         JoyGemSIManager.shared().stop()
index 886600f..dba5d8d 100644 (file)
@@ -176,11 +176,11 @@ class JoyStereoCallVC:BaseVC{
     }
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = false
+        disablePopGesture()
     }
     override func viewDidDisappear(_ animated: Bool) {
         super.viewDidDisappear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        enablePopGesture()
     }
     override func navleftViewTapped() {
         if toolBar.recordBtn.isSelected {
index cd98e53..8b3fa25 100644 (file)
@@ -118,14 +118,14 @@ class JoyTctyVC:BaseVC{
 
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = false
+        disablePopGesture()
         
         PcmSound.sharedInstance().delegate = sdk
         CCAiManager.preparePlayBlueTooth()
     }
     override func viewDidDisappear(_ animated: Bool) {
         super.viewDidDisappear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        enablePopGesture()
         CCAiManager.stopPlay()
     }
     override func navleftViewTapped() {
index 8a9662e..f583f0b 100644 (file)
@@ -109,11 +109,11 @@ class JoyXclyVC:BaseVC{
     }
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = false
+        disablePopGesture()
     }
     override func viewDidDisappear(_ animated: Bool) {
         super.viewDidDisappear(animated)
-        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        enablePopGesture()
     }
     override func navleftViewTapped() {
         if toolBar.recordBtn.isSelected {
index 525bc4c..e33c1f7 100644 (file)
@@ -11,12 +11,22 @@ import FDFullscreenPopGesture
 class BaseNC: UINavigationController {
     override init(rootViewController: UIViewController) {
         super.init(rootViewController: rootViewController)
-        fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        if #available(iOS 26.0, *) {
+            navigationController?.interactiveContentPopGestureRecognizer?.isEnabled = true
+        } else {
+            // Fallback on earlier versions
+        }
     }
     
     required init?(coder aDecoder: NSCoder) {
         super.init(coder: aDecoder)
-        fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        if #available(iOS 26.0, *) {
+            navigationController?.interactiveContentPopGestureRecognizer?.isEnabled = true
+        } else {
+            // Fallback on earlier versions
+        }
     }
     override var preferredStatusBarStyle: UIStatusBarStyle {
         return topViewController?.preferredStatusBarStyle ?? .lightContent
index 8450388..d286523 100644 (file)
@@ -96,6 +96,22 @@ open class BaseVC:UIViewController {
     @objc func logAction(){
         App.shared.goToPage(LogVC())
     }
+    func enablePopGesture(){
+        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = true
+        if #available(iOS 26.0, *) {
+            navigationController?.interactiveContentPopGestureRecognizer?.isEnabled = true
+        } else {
+            // Fallback on earlier versions
+        }
+    }
+    func disablePopGesture(){
+        navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = false
+        if #available(iOS 26.0, *) {
+            navigationController?.interactiveContentPopGestureRecognizer?.isEnabled = false
+        } else {
+            // Fallback on earlier versions
+        }
+    }
 }
 
 extension BaseVC: BaseNavigationBarDelegate {
index 7c9a8c7..f13a589 100644 (file)
@@ -63,13 +63,13 @@ class BindingPhoneVC:BaseVC{
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
         if isBingding{
-            navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = false
+            disablePopGesture()
         }
     }
     override func viewDidDisappear(_ animated: Bool) {
         super.viewDidDisappear(animated)
         if isBingding{
-            navigationController?.fd_fullscreenPopGestureRecognizer?.isEnabled = true
+            enablePopGesture()
         }
     }
 //    override func navRightViewTapped() {