tableview滚动到底部优化
authorliangzhenying <867174124@qq.com>
Tue, 24 Feb 2026 06:39:10 +0000 (14:39 +0800)
committerliangzhenying <867174124@qq.com>
Tue, 24 Feb 2026 06:39:10 +0000 (14:39 +0800)
17 files changed:
DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/VC/CallRecordVC.swift
ShenYin/Pods/Kingfisher/PrivacyInfo.xcprivacy [deleted file]
ShenYin/Pods/MBProgressHUD/PrivacyInfo.xcprivacy [deleted file]
ShenYin/ShenYin.xcodeproj/project.pbxproj
ShenYin/ShenYin/Sdk/DcSdk/VC/DcChatVC.swift
ShenYin/ShenYin/Sdk/DcSdk/VC/DcChinese2EnglishVC.swift
ShenYin/ShenYin/Sdk/DcSdk/VC/DcDialogTranslateVC.swift
ShenYin/ShenYin/Sdk/JoySdk/VC/JoyChatVC.swift
ShenYin/ShenYin/Sdk/JoySdk/VC/JoyChinese2EnglishVC.swift
ShenYin/ShenYin/Sdk/JoySdk/VC/JoyDialogTranlateVC.swift
ShenYin/ShenYin/UI/Customer/CustomerVC.swift
ShenYin/ShenYin/UI/Home/Dialog/DialogSplitView.swift
ShenYin/ShenYin/UI/Home/TextTranslate/TextTranslateVC.swift
ShenYin/ShenYin/UI/Mine/Feedback/FeedbackContentView.swift
ShenYin/ShenYin/UI/Mine/Feedback/FeekbackVC.swift
ShenYin/ShenYin/UI/Raisound/RSChatVC.swift
ShenYin/podfile

index e247ac5..2ac8b8c 100644 (file)
@@ -79,6 +79,27 @@ class CallRecordVC: BaseVC {
         CallRecordManager.shared.callRecordNotOnCall = {[weak self]  in
             guard let self = self else { return  }
             self.recordBtn.isSelected = false
+            self.view.makeToast("当前不在通话状态")
+        }
+        // 状态码回调
+        //20001,///开始录音
+        //20002,///停止录音
+        //20003,///录音出错
+        //20004,///蓝牙断开
+        //30001,///socket连上
+        //30002,///socket断开连接
+        //30003,///socket连接中...
+        //30004,///ping超时
+        //50000,///网络错误
+        //60000,///未鉴权
+        CallRecordManager.shared.codeCallback = { [weak self] code in
+            guard let self = self else{return}
+            if code == 20001 {
+                self.recordBtn.isSelected = true
+            }
+            else if code == 20002 || code == 20003{
+                self.recordBtn.isSelected = false
+            }
         }
     }
     
diff --git a/ShenYin/Pods/Kingfisher/PrivacyInfo.xcprivacy b/ShenYin/Pods/Kingfisher/PrivacyInfo.xcprivacy
deleted file mode 100644 (file)
index 6af1641..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-       <key>NSPrivacyTracking</key>
-       <false/>
-       <key>NSPrivacyCollectedDataTypes</key>
-       <array/>
-       <key>NSPrivacyTrackingDomains</key>
-       <array/>
-       <key>NSPrivacyAccessedAPITypes</key>
-       <array/>
-</dict>
-</plist>
diff --git a/ShenYin/Pods/MBProgressHUD/PrivacyInfo.xcprivacy b/ShenYin/Pods/MBProgressHUD/PrivacyInfo.xcprivacy
deleted file mode 100644 (file)
index 6af1641..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-       <key>NSPrivacyTracking</key>
-       <false/>
-       <key>NSPrivacyCollectedDataTypes</key>
-       <array/>
-       <key>NSPrivacyTrackingDomains</key>
-       <array/>
-       <key>NSPrivacyAccessedAPITypes</key>
-       <array/>
-</dict>
-</plist>
index edce901..a881ca5 100644 (file)
@@ -17,8 +17,8 @@
                644D1BB5EDD3EA1D77C57786 /* Pods_DeepChordsSdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 248D8B53B5A178ACA5867275 /* Pods_DeepChordsSdk.framework */; };
                7666589AAA94A323B6090425 /* Pods_playboy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A4F1BB919D567C3B6B0EBAA7 /* Pods_playboy.framework */; };
                7A6613B4B617D6E71D34944C /* Pods_ShenYin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90FF0C8B0D4D6AE0933FA672 /* Pods_ShenYin.framework */; };
-               817510A595D00CAD05E3772C /* (null) in Frameworks */ = {isa = PBXBuildFile; };
-               F2E449CAD5874BE652A69B50 /* (null) in Frameworks */ = {isa = PBXBuildFile; };
+               817510A595D00CAD05E3772C /* BuildFile in Frameworks */ = {isa = PBXBuildFile; };
+               F2E449CAD5874BE652A69B50 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
 /* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
 
 /* Begin PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet section */
-               3FCC8B152F1E0280004C2A13 /* Exceptions for "ShenYin" folder in "Embed Frameworks" phase from "ShenYin" target */ = {
+               3FCC8B152F1E0280004C2A13 /* Exceptions for "ShenYin" folder in "Embed Frameworks" build phase */ = {
                        isa = PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet;
-                       attributesByRelativePath = {
-                               Sdk/JoySdk/tool/JoyGemAI.framework = (CodeSignOnCopy, RemoveHeadersOnCopy, );
-                       };
                        buildPhase = 3FEFE9092F1B252000D82F17 /* Embed Frameworks */;
                        membershipExceptions = (
                                Sdk/JoySdk/tool/JoyGemAI.framework,
                        );
                };
-               3FCC8B1A2F1E030E004C2A13 /* Exceptions for "ShenYin" folder in "Embed Frameworks" phase from "playboy" target */ = {
+               3FCC8B1A2F1E030E004C2A13 /* Exceptions for "ShenYin" folder in "Embed Frameworks" build phase */ = {
                        isa = PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet;
-                       attributesByRelativePath = {
-                               Sdk/DcSdk/tool/JLAudioUnitKit.xcframework = (CodeSignOnCopy, RemoveHeadersOnCopy, );
-                       };
                        buildPhase = 3FD1DFEF2F0E00BF00A62733 /* Embed Frameworks */;
                        membershipExceptions = (
                                Sdk/DcSdk/tool/JLAudioUnitKit.xcframework,
                        );
                };
-               3FFB77C62F17A11100EF9A60 /* Exceptions for "DeepChordsSdk" folder in "Embed Frameworks" phase from "DeepChordsSdk" target */ = {
+               3FFB77C62F17A11100EF9A60 /* Exceptions for "DeepChordsSdk" folder in "Embed Frameworks" build phase */ = {
                        isa = PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet;
-                       attributesByRelativePath = {
-                               StarburstSdk.framework = (CodeSignOnCopy, RemoveHeadersOnCopy, );
-                       };
                        buildPhase = 3FFB77C52F17A11100EF9A60 /* Embed Frameworks */;
                        membershipExceptions = (
                                StarburstSdk.framework,
                0D54E0F02F0A61E600A80EE7 /* DeepChordsSdk */ = {
                        isa = PBXFileSystemSynchronizedRootGroup;
                        exceptions = (
-                               3FFB77C62F17A11100EF9A60 /* Exceptions for "DeepChordsSdk" folder in "Embed Frameworks" phase from "DeepChordsSdk" target */,
+                               3FFB77C62F17A11100EF9A60 /* Exceptions for "DeepChordsSdk" folder in "Embed Frameworks" build phase */,
                                3FFB77C82F17A14C00EF9A60 /* Exceptions for "DeepChordsSdk" folder in "playboy" target */,
                        );
                        path = DeepChordsSdk;
                        isa = PBXFileSystemSynchronizedRootGroup;
                        exceptions = (
                                3F887BAE2E38D8DD00C98658 /* Exceptions for "ShenYin" folder in "ShenYin" target */,
-                               3FCC8B152F1E0280004C2A13 /* Exceptions for "ShenYin" folder in "Embed Frameworks" phase from "ShenYin" target */,
+                               3FCC8B152F1E0280004C2A13 /* Exceptions for "ShenYin" folder in "Embed Frameworks" build phase */,
                                3FD1DFF52F0E00BF00A62733 /* Exceptions for "ShenYin" folder in "playboy" target */,
-                               3FCC8B1A2F1E030E004C2A13 /* Exceptions for "ShenYin" folder in "Embed Frameworks" phase from "playboy" target */,
+                               3FCC8B1A2F1E030E004C2A13 /* Exceptions for "ShenYin" folder in "Embed Frameworks" build phase */,
                                3F03696C2F2B604900F3CB95 /* Exceptions for "ShenYin" folder in "playboy copy" target */,
                        );
                        path = ShenYin;
                        isa = PBXFrameworksBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
-                               F2E449CAD5874BE652A69B50 /* (null) in Frameworks */,
+                               F2E449CAD5874BE652A69B50 /* BuildFile in Frameworks */,
                                7A6613B4B617D6E71D34944C /* Pods_ShenYin.framework in Frameworks */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        buildActionMask = 2147483647;
                        files = (
                                3FFB77C12F179F3100EF9A60 /* DeepChordsSdk.framework in Frameworks */,
-                               817510A595D00CAD05E3772C /* (null) in Frameworks */,
+                               817510A595D00CAD05E3772C /* BuildFile in Frameworks */,
                                30B13DEF1AA0E4C54D873276 /* Pods_playboy.framework in Frameworks */,
                                7666589AAA94A323B6090425 /* Pods_playboy.framework in Frameworks */,
                        );
                        inputFileListPaths = (
                                "${PODS_ROOT}/Target Support Files/Pods-playboy/Pods-playboy-frameworks-${CONFIGURATION}-input-files.xcfilelist",
                        );
-                       inputPaths = (
-                       );
                        name = "[CP] Embed Pods Frameworks";
                        outputFileListPaths = (
                                "${PODS_ROOT}/Target Support Files/Pods-playboy/Pods-playboy-frameworks-${CONFIGURATION}-output-files.xcfilelist",
                        );
-                       outputPaths = (
-                       );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
                        shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-playboy/Pods-playboy-frameworks.sh\"\n";
                        inputFileListPaths = (
                                "${PODS_ROOT}/Target Support Files/Pods-ShenYin/Pods-ShenYin-frameworks-${CONFIGURATION}-input-files.xcfilelist",
                        );
-                       inputPaths = (
-                       );
                        name = "[CP] Embed Pods Frameworks";
                        outputFileListPaths = (
                                "${PODS_ROOT}/Target Support Files/Pods-ShenYin/Pods-ShenYin-frameworks-${CONFIGURATION}-output-files.xcfilelist",
                        );
-                       outputPaths = (
-                       );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
                        shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ShenYin/Pods-ShenYin-frameworks.sh\"\n";
                        inputFileListPaths = (
                                "${PODS_ROOT}/Target Support Files/Pods-ShenYin/Pods-ShenYin-resources-${CONFIGURATION}-input-files.xcfilelist",
                        );
-                       inputPaths = (
-                       );
                        name = "[CP] Copy Pods Resources";
                        outputFileListPaths = (
                                "${PODS_ROOT}/Target Support Files/Pods-ShenYin/Pods-ShenYin-resources-${CONFIGURATION}-output-files.xcfilelist",
                        );
-                       outputPaths = (
-                       );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
                        shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ShenYin/Pods-ShenYin-resources.sh\"\n";
index e2f4302..e63a4ed 100644 (file)
@@ -83,7 +83,7 @@ class DcChatVC:BaseVC{
             guard let self = self else{return}
             tableView.reloadData()
             if DcChatManager.shared.dataList.count > 0 {
-                tableView.scrollToRow(at: IndexPath(row: DcChatManager.shared.dataList.count - 1, section: 0), at: .none, animated: true)
+                tableView.scrollToRow(at: IndexPath(row: DcChatManager.shared.dataList.count - 1, section: 0), at: .bottom, animated: true)
             }
         }
         DcChatManager.shared.codeCallback = { [weak self] code in
index bd19b94..a50b38c 100644 (file)
@@ -106,7 +106,7 @@ class DcChinese2EnglishVC:BaseVC{
     func refreshData(){
         tableView.reloadData()
         if dataList.count > 0 {
-            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .none, animated: true)
+            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .bottom, animated: true)
             bg.isHidden = true
         }
         else{
index 9d55daa..c4ba60f 100644 (file)
@@ -98,7 +98,7 @@ class DcDialogTranslateVC:BaseVC{
     func refreshData(){
         tableView.reloadData()
         if dataList.count > 0 {
-            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .none, animated: true)
+            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .bottom, animated: true)
         }
         splitView.dataList = dataList
     }
index c61bbfc..d4c2a1e 100644 (file)
@@ -153,7 +153,10 @@ class JoyChatVC:BaseVC{
     func refreshData(){
         tableView.reloadData()
         if JoySdkManager.shared.chat.dataList.count > 0 {
-            tableView.scrollToRow(at: IndexPath(row: JoySdkManager.shared.chat.dataList.count - 1, section: 0), at: .none, animated: false)
+//            DispatchQueue.main.async {
+//                self.tableView.layoutIfNeeded()
+                self.tableView.scrollToRow(at: IndexPath(row: JoySdkManager.shared.chat.dataList.count - 1, section: 0), at: .bottom, animated: true)
+//            }
         }
     }
     func loadRoleList(){
index 361c5a8..f8e9bfe 100644 (file)
@@ -106,7 +106,7 @@ class JoyChinese2EnglishVC:BaseVC{
     func refreshData(){
         tableView.reloadData()
         if dataList.count > 0 {
-            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .none, animated: true)
+            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .bottom, animated: true)
             bg.isHidden = true
         }
         else{
index eec522a..5ec3590 100644 (file)
@@ -102,7 +102,7 @@ class JoyDialogTranslateVC:BaseVC{
     func refreshData(){
         tableView.reloadData()
         if dataList.count > 0 {
-            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .none, animated: true)
+            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .bottom, animated: true)
         }
         splitView.dataList = dataList
     }
index e5d4931..39eb5b1 100644 (file)
@@ -86,7 +86,7 @@ class CustomerVC:BaseVC{
     func refreshData(){
         tableView.reloadData()
         if dataList.count > 0 {
-            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .none, animated: true)
+            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .bottom, animated: true)
         }
     }
     func addModel(_ model:QaModelListModel){
index 1a49f19..869595c 100644 (file)
@@ -23,8 +23,8 @@ class DialogSplitView: BaseView {
             tableView2.reloadData()
             
             if dataList.count > 0 {
-                tableView1.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .none, animated: true)
-                tableView2.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .none, animated: true)
+                tableView1.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .bottom, animated: true)
+                tableView2.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .bottom, animated: true)
             }
 
         }
index d39f0f5..537f4be 100644 (file)
@@ -67,7 +67,7 @@ class TextTranlateVC:BaseVC{
     func refreshData(){
         tableView.reloadData()
         if dataList.count > 0 {
-            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .none, animated: true)
+            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .bottom, animated: true)
         }
     }
 }
index f855ee9..7604742 100644 (file)
@@ -44,7 +44,7 @@ class FeedbackContentView: BaseView {
         list.append(model)
         tableView.reloadData()
         if list.count > 0 {
-            tableView.scrollToRow(at: IndexPath(row: list.count - 1, section: 0), at: .none, animated: true)
+            tableView.scrollToRow(at: IndexPath(row: list.count - 1, section: 0), at: .bottom, animated: true)
         }
     }
 }
index 0ce0314..a66da9d 100644 (file)
@@ -81,7 +81,7 @@ class FeekbackVC:BaseVC{
     func refreshData(){
         tableView.reloadData()
         if dataList.count > 0 {
-            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .none, animated: true)
+            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .bottom, animated: true)
         }
     }
     func addModel(_ model:QaModelListModel){
index ded8bf3..56e1f2e 100644 (file)
@@ -143,7 +143,7 @@ class RSChatVC:BaseVC{
     func refreshData(){
         tableView.reloadData()
         if dataList.count > 0 {
-            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .none, animated: false)
+            tableView.scrollToRow(at: IndexPath(row: dataList.count - 1, section: 0), at: .bottom, animated: true)
         }
     }
     override func navRightViewTapped() {
index b32c0c4..72904a7 100644 (file)
@@ -51,9 +51,9 @@ target 'ShenYin' do
   pod 'HorizonCalendar'#日历
 
   #高德地图
-  pod 'AMap3DMap-NO-IDFA', '10.0.700'
-  pod 'AMapLocation-NO-IDFA'
-  pod 'AMapSearch-NO-IDFA', '9.7.0'
+#  pod 'AMap3DMap-NO-IDFA', '10.0.700'
+#  pod 'AMapLocation-NO-IDFA'
+#  pod 'AMapSearch-NO-IDFA', '9.7.0'
   
 end