Skip to content

Commit d151983

Browse files
authored
Merge pull request #29 from hyhSuper/v3.3.0beta
优化UI, JMessage版本使用3.8.1
2 parents 03f356b + 3b22373 commit d151983

File tree

8 files changed

+39
-20
lines changed

8 files changed

+39
-20
lines changed

JChat.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,7 @@
14651465
files = (
14661466
);
14671467
inputPaths = (
1468-
"${SRCROOT}/Pods/Target Support Files/Pods-JChat/Pods-JChat-resources.sh",
1468+
"${PODS_ROOT}/Target Support Files/Pods-JChat/Pods-JChat-resources.sh",
14691469
"${PODS_ROOT}/BaiduMapKit/BaiduMapKit/BaiduMapAPI_Map.framework/Resources/mapapi.bundle",
14701470
);
14711471
name = "[CP] Copy Pods Resources";
@@ -1474,7 +1474,7 @@
14741474
);
14751475
runOnlyForDeploymentPostprocessing = 0;
14761476
shellPath = /bin/sh;
1477-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-JChat/Pods-JChat-resources.sh\"\n";
1477+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-JChat/Pods-JChat-resources.sh\"\n";
14781478
showEnvVarsInLog = 0;
14791479
};
14801480
B8FCE143076776F1905564C8 /* [CP] Check Pods Manifest.lock */ = {
@@ -1501,7 +1501,7 @@
15011501
files = (
15021502
);
15031503
inputPaths = (
1504-
"${SRCROOT}/Pods/Target Support Files/Pods-JChat/Pods-JChat-frameworks.sh",
1504+
"${PODS_ROOT}/Target Support Files/Pods-JChat/Pods-JChat-frameworks.sh",
15051505
"${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
15061506
"${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework",
15071507
"${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework",
@@ -1524,7 +1524,7 @@
15241524
);
15251525
runOnlyForDeploymentPostprocessing = 0;
15261526
shellPath = /bin/sh;
1527-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-JChat/Pods-JChat-frameworks.sh\"\n";
1527+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-JChat/Pods-JChat-frameworks.sh\"\n";
15281528
showEnvVarsInLog = 0;
15291529
};
15301530
/* End PBXShellScriptBuildPhase section */

JChat/Src/ChatModule/Chat/Model/JCCEmoticonGroup.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import UIKit
1010

1111
class JCCEmoticonGroup: JCEmoticonGroup {
12-
init?(contentsOfFile: String) {
12+
@objc init?(contentsOfFile: String) {
1313
guard let dic = NSDictionary(contentsOfFile: contentsOfFile), let arr = dic["emoticons"] as? NSArray else {
1414
return nil
1515
}

JChat/Src/ChatRoomModule/ViewController/JCCRSearchResultViewController.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ extension JCCRSearchResultViewController: UITableViewDelegate,UITableViewDataSou
181181
selectChatRoom = self.searchResultList[indexPath.row]
182182
_clearHistoricalRecord()
183183
self.searchController.isActive = false
184+
184185
}
185186
}
186187

JChat/Src/ChatRoomModule/ViewController/JCChatRoomChatViewController.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,9 @@ extension JCChatRoomChatViewController: JMessageDelegate {
539539
let jcMsg = JCMessage.init(content: noticeContent)
540540
messages.append(jcMsg)
541541
chatView.append(jcMsg)
542+
if !chatView.isRoll {
543+
chatView.scrollToLast(animated: true)
544+
}
542545
}
543546
}
544547
}

JChat/Src/ChatRoomModule/ViewController/JCChatRoomIntroduceViewController.xib

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,28 @@
2121
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
2222
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
2323
<subviews>
24-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="聊天室介绍" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0ad-Bk-tBP">
25-
<rect key="frame" x="22" y="30" width="87" height="41"/>
24+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iN9-PF-ssE">
25+
<rect key="frame" x="0.0" y="44" width="375" height="300"/>
26+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
2627
<constraints>
27-
<constraint firstAttribute="height" constant="41" id="gX8-QO-DWa"/>
28+
<constraint firstAttribute="height" constant="300" id="I6q-Fe-iTG"/>
2829
</constraints>
2930
<fontDescription key="fontDescription" type="system" pointSize="17"/>
3031
<nil key="textColor"/>
3132
<nil key="highlightedColor"/>
3233
</label>
34+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="聊天室介绍" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0ad-Bk-tBP">
35+
<rect key="frame" x="22" y="25" width="72" height="30"/>
36+
<constraints>
37+
<constraint firstAttribute="height" constant="30" id="gX8-QO-DWa"/>
38+
</constraints>
39+
<fontDescription key="fontDescription" type="system" pointSize="14"/>
40+
<nil key="textColor"/>
41+
<nil key="highlightedColor"/>
42+
</label>
3343
<textView autoresizesSubviews="NO" clipsSubviews="YES" multipleTouchEnabled="YES" alpha="0.5" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" editable="NO" textAlignment="natural" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4IY-88-30G">
34-
<rect key="frame" x="16" y="79" width="343" height="200"/>
35-
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
44+
<rect key="frame" x="16" y="63" width="343" height="200"/>
45+
<color key="backgroundColor" red="0.90980392156862744" green="0.92941176470588238" blue="0.95294117647058818" alpha="1" colorSpace="calibratedRGB"/>
3646
<constraints>
3747
<constraint firstAttribute="height" constant="200" id="IPC-Nx-hHH"/>
3848
</constraints>
@@ -44,14 +54,17 @@
4454
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
4555
<constraints>
4656
<constraint firstItem="4IY-88-30G" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leadingMargin" id="Kws-oo-gAx"/>
57+
<constraint firstItem="iN9-PF-ssE" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="LvA-Xv-uJh"/>
58+
<constraint firstItem="iN9-PF-ssE" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="44" id="PIs-S4-zQm"/>
4759
<constraint firstItem="4IY-88-30G" firstAttribute="top" secondItem="0ad-Bk-tBP" secondAttribute="bottom" constant="8" id="RKo-MO-uaU"/>
48-
<constraint firstItem="0ad-Bk-tBP" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="10" id="Xgh-1c-UBE"/>
60+
<constraint firstItem="0ad-Bk-tBP" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="5" id="Xgh-1c-UBE"/>
4961
<constraint firstItem="4IY-88-30G" firstAttribute="top" secondItem="0ad-Bk-tBP" secondAttribute="bottom" constant="8" symbolic="YES" id="lYm-i7-rvc"/>
62+
<constraint firstItem="iN9-PF-ssE" firstAttribute="trailing" secondItem="fnl-2z-Ty3" secondAttribute="trailing" id="mmf-dR-GQ0"/>
5063
<constraint firstItem="4IY-88-30G" firstAttribute="trailing" secondItem="i5M-Pr-FkT" secondAttribute="trailingMargin" id="r6b-oL-B0N"/>
5164
<constraint firstItem="0ad-Bk-tBP" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="22" id="tJZ-iR-DDO"/>
5265
</constraints>
5366
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
54-
<point key="canvasLocation" x="79.710144927536234" y="39.508928571428569"/>
67+
<point key="canvasLocation" x="79.200000000000003" y="39.130434782608695"/>
5568
</view>
5669
</objects>
5770
</document>

JChat/Src/ChatRoomModule/ViewController/JCChatRoomListViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ extension JCChatRoomListViewController: UISearchControllerDelegate {
222222
listTableView.isHidden = false
223223
let nav = searchController.searchResultsController as! JCNavigationController
224224
nav.isNavigationBarHidden = true
225-
// nav.popToRootViewController(animated: false)
226-
// navigationController?.tabBarController?.tabBar.isHidden = false
225+
nav.popToRootViewController(animated: false)
226+
navigationController?.tabBarController?.tabBar.isHidden = false
227227
}
228228

229229
func didDismissSearchController(_ searchController: UISearchController){

JChat/Src/ChatRoomModule/ViewController/JCChatRoomNameInfoViewController.xib

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@
2222
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
2323
<subviews>
2424
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UZX-pR-jzv">
25-
<rect key="frame" x="0.0" y="20" width="375" height="166"/>
25+
<rect key="frame" x="0.0" y="20" width="375" height="105"/>
2626
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
27+
<constraints>
28+
<constraint firstAttribute="height" constant="105" id="JML-Ay-der"/>
29+
</constraints>
2730
<fontDescription key="fontDescription" type="system" pointSize="17"/>
2831
<nil key="textColor"/>
2932
<nil key="highlightedColor"/>
@@ -39,11 +42,11 @@
3942
</label>
4043
<textView autoresizesSubviews="NO" clipsSubviews="YES" multipleTouchEnabled="YES" alpha="0.5" contentMode="scaleToFill" editable="NO" text="志愿者" translatesAutoresizingMaskIntoConstraints="NO" id="ScF-mX-r5U">
4144
<rect key="frame" x="16" y="74" width="343" height="44"/>
42-
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
45+
<color key="backgroundColor" red="0.90980392156862744" green="0.92941176470588238" blue="0.95294117647058818" alpha="1" colorSpace="calibratedRGB"/>
4346
<constraints>
4447
<constraint firstAttribute="height" constant="44" id="oDL-Eb-SMH"/>
4548
</constraints>
46-
<fontDescription key="fontDescription" type="system" pointSize="20"/>
49+
<fontDescription key="fontDescription" type="system" pointSize="14"/>
4750
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
4851
</textView>
4952
</subviews>
@@ -54,10 +57,9 @@
5457
<constraint firstItem="97k-3G-FI0" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="8" id="WcV-se-Zbm"/>
5558
<constraint firstItem="UZX-pR-jzv" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="Y3X-Pi-7GN"/>
5659
<constraint firstItem="97k-3G-FI0" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leadingMargin" id="Z4r-Wo-GFn"/>
57-
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="UZX-pR-jzv" secondAttribute="bottom" constant="481" id="cnd-aD-QXy"/>
5860
<constraint firstItem="ScF-mX-r5U" firstAttribute="trailing" secondItem="i5M-Pr-FkT" secondAttribute="trailingMargin" id="l8U-pN-xgy"/>
59-
<constraint firstItem="UZX-pR-jzv" firstAttribute="centerX" secondItem="ScF-mX-r5U" secondAttribute="centerX" id="m7T-xw-kds"/>
6061
<constraint firstItem="ScF-mX-r5U" firstAttribute="top" secondItem="97k-3G-FI0" secondAttribute="bottom" constant="5" id="uCw-BZ-G01"/>
62+
<constraint firstItem="UZX-pR-jzv" firstAttribute="trailing" secondItem="fnl-2z-Ty3" secondAttribute="trailing" id="wiF-44-3SP"/>
6163
</constraints>
6264
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
6365
<point key="canvasLocation" x="34.399999999999999" y="34.632683658170919"/>

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ target 'JChat' do
99
pod 'YHPopupView'
1010
pod 'YHPhotoKit'
1111
pod 'MJRefresh'
12-
pod 'JMessage'
12+
pod 'JMessage','~> 3.8.1'
1313
pod 'FMDB'
1414
pod 'RxSwift','~> 4.2.0'
1515
pod 'RxCocoa','~> 4.4.1'

0 commit comments

Comments
 (0)