From 3b223731b6bafd1c4cc202adc788e62b91a693cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ios=E5=BC=80=E5=8F=91-=E4=BE=AF=E5=BD=A6=E8=BE=89?= Date: Sat, 25 May 2019 14:05:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96UI,=20=20JMessage=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E4=BD=BF=E7=94=A83.8.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- JChat.xcodeproj/project.pbxproj | 8 +++--- .../Chat/Model/JCCEmoticonGroup.swift | 2 +- .../JCCRSearchResultViewController.swift | 1 + .../JCChatRoomChatViewController.swift | 3 +++ .../JCChatRoomIntroduceViewController.xib | 27 ++++++++++++++----- .../JCChatRoomListViewController.swift | 4 +-- .../JCChatRoomNameInfoViewController.xib | 12 +++++---- Podfile | 2 +- 8 files changed, 39 insertions(+), 20 deletions(-) diff --git a/JChat.xcodeproj/project.pbxproj b/JChat.xcodeproj/project.pbxproj index b7d22f3..c29313a 100644 --- a/JChat.xcodeproj/project.pbxproj +++ b/JChat.xcodeproj/project.pbxproj @@ -1465,7 +1465,7 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-JChat/Pods-JChat-resources.sh", + "${PODS_ROOT}/Target Support Files/Pods-JChat/Pods-JChat-resources.sh", "${PODS_ROOT}/BaiduMapKit/BaiduMapKit/BaiduMapAPI_Map.framework/Resources/mapapi.bundle", ); name = "[CP] Copy Pods Resources"; @@ -1474,7 +1474,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-JChat/Pods-JChat-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-JChat/Pods-JChat-resources.sh\"\n"; showEnvVarsInLog = 0; }; B8FCE143076776F1905564C8 /* [CP] Check Pods Manifest.lock */ = { @@ -1501,7 +1501,7 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-JChat/Pods-JChat-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-JChat/Pods-JChat-frameworks.sh", "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework", "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", @@ -1524,7 +1524,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-JChat/Pods-JChat-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-JChat/Pods-JChat-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ diff --git a/JChat/Src/ChatModule/Chat/Model/JCCEmoticonGroup.swift b/JChat/Src/ChatModule/Chat/Model/JCCEmoticonGroup.swift index 0b7acf5..6216cd6 100644 --- a/JChat/Src/ChatModule/Chat/Model/JCCEmoticonGroup.swift +++ b/JChat/Src/ChatModule/Chat/Model/JCCEmoticonGroup.swift @@ -9,7 +9,7 @@ import UIKit class JCCEmoticonGroup: JCEmoticonGroup { - init?(contentsOfFile: String) { + @objc init?(contentsOfFile: String) { guard let dic = NSDictionary(contentsOfFile: contentsOfFile), let arr = dic["emoticons"] as? NSArray else { return nil } diff --git a/JChat/Src/ChatRoomModule/ViewController/JCCRSearchResultViewController.swift b/JChat/Src/ChatRoomModule/ViewController/JCCRSearchResultViewController.swift index 706d8bb..72f4e8a 100644 --- a/JChat/Src/ChatRoomModule/ViewController/JCCRSearchResultViewController.swift +++ b/JChat/Src/ChatRoomModule/ViewController/JCCRSearchResultViewController.swift @@ -181,6 +181,7 @@ extension JCCRSearchResultViewController: UITableViewDelegate,UITableViewDataSou selectChatRoom = self.searchResultList[indexPath.row] _clearHistoricalRecord() self.searchController.isActive = false + } } diff --git a/JChat/Src/ChatRoomModule/ViewController/JCChatRoomChatViewController.swift b/JChat/Src/ChatRoomModule/ViewController/JCChatRoomChatViewController.swift index af7206d..8edba13 100644 --- a/JChat/Src/ChatRoomModule/ViewController/JCChatRoomChatViewController.swift +++ b/JChat/Src/ChatRoomModule/ViewController/JCChatRoomChatViewController.swift @@ -539,6 +539,9 @@ extension JCChatRoomChatViewController: JMessageDelegate { let jcMsg = JCMessage.init(content: noticeContent) messages.append(jcMsg) chatView.append(jcMsg) + if !chatView.isRoll { + chatView.scrollToLast(animated: true) + } } } } diff --git a/JChat/Src/ChatRoomModule/ViewController/JCChatRoomIntroduceViewController.xib b/JChat/Src/ChatRoomModule/ViewController/JCChatRoomIntroduceViewController.xib index 767e6ca..8255263 100644 --- a/JChat/Src/ChatRoomModule/ViewController/JCChatRoomIntroduceViewController.xib +++ b/JChat/Src/ChatRoomModule/ViewController/JCChatRoomIntroduceViewController.xib @@ -21,18 +21,28 @@ -