Browse Source

1.群公告样式

Steven 2 days ago
parent
commit
0c3c58b32d

+ 9 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.h

@@ -292,6 +292,15 @@ NS_ASSUME_NONNULL_BEGIN
 /// @param faliure 失败
 + (void)selectRoomConfigRequest:(NSString *)get success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
 #pragma mark -------- 群组服务
+// /api-student/imUserFriend/getMessageUser/CLX_2250235_STUDENT
+
+/// 查询聊天用户信息
+/// @param post post
+/// @param imUserId 用户imUserId
+/// @param success 成功
+/// @param faliure 失败
++ (void)getMessageUserRequset:(NSString *)post imUserId:(NSString *)imUserId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure;
+
 // /api-student/imUserFriend/queryAll
 
 /// 查询好友列表

+ 15 - 0
KulexiuForStudent/KulexiuForStudent/Common/Base/KSNetworkingManager.m

@@ -738,6 +738,21 @@
 }
 
 #pragma mark -------- 群组服务
+// /api-student/imUserFriend/getMessageUser/CLX_2250235_STUDENT
+
+/// 查询聊天用户信息
+/// @param post post
+/// @param imUserId 用户imUserId
+/// @param success 成功
+/// @param faliure 失败
++ (void)getMessageUserRequset:(NSString *)post imUserId:(NSString *)imUserId success:(void(^)(NSDictionary *dic))success faliure:(void(^)(NSError *error))faliure {
+    
+    [self configRequestMethodJSON];
+    NSString *url = [NSString stringWithFormat:@"%@%@/%@",hostURL, @"/api-student/imUserFriend/getMessageUser",imUserId];
+    NSMutableDictionary *parm = [NSMutableDictionary dictionary];
+    [self request:post andWithUrl:url and:parm success:success faliure:faliure];
+}
+
 // /api-student/imUserFriend/queryAll
 
 /// 查询好友列表

+ 5 - 5
KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSPlatformDownloadAlert.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_12" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -18,7 +18,7 @@
                     <rect key="frame" x="49" y="334" width="295" height="184"/>
                     <subviews>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="下载成功" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2hf-n1-Ei5">
-                            <rect key="frame" x="20" y="15" width="65.333333333333329" height="25"/>
+                            <rect key="frame" x="19.999999999999996" y="15" width="63.666666666666657" height="25"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="25" id="WjL-hX-4pp"/>
                             </constraints>
@@ -41,7 +41,7 @@
                             </connections>
                         </button>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="文件已保存到以下地址" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DDJ-Jw-w5Y">
-                            <rect key="frame" x="20" y="55" width="163.33333333333334" height="26"/>
+                            <rect key="frame" x="20" y="55" width="159" height="26"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="26" id="WXk-xA-TBs"/>
                             </constraints>
@@ -166,7 +166,7 @@
                 <outlet property="containerView" destination="c7t-Gm-jfe" id="IW1-jT-SlI"/>
                 <outlet property="descLabel" destination="1BL-ja-AeR" id="T6F-1E-8nZ"/>
             </connections>
-            <point key="canvasLocation" x="31" y="20"/>
+            <point key="canvasLocation" x="29.770992366412212" y="19.718309859154932"/>
         </view>
     </objects>
     <resources>

+ 7 - 4
KulexiuForStudent/KulexiuForStudent/Common/Base/WebView/KSSourceDownloadAlert.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_12" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -25,7 +25,7 @@
                             </constraints>
                         </imageView>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="下载成功" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lnB-qu-Uf7">
-                            <rect key="frame" x="110.66666666666666" y="20" width="74" height="25"/>
+                            <rect key="frame" x="111.66666666666666" y="20" width="71.666666666666657" height="25"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="25" id="IgN-1l-ZSs"/>
                             </constraints>
@@ -43,9 +43,12 @@
                                 <constraint firstAttribute="width" constant="40" id="sUc-rj-hAl"/>
                             </constraints>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                            <connections>
+                                <action selector="cancelAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="Wc5-ey-M6p"/>
+                            </connections>
                         </button>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="文件已保存到以下地址" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EP8-xw-on3">
-                            <rect key="frame" x="20" y="65" width="163.33333333333334" height="26"/>
+                            <rect key="frame" x="20" y="65" width="159" height="26"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="26" id="fCS-pG-zdm"/>
                             </constraints>

+ 5 - 15
KulexiuForStudent/KulexiuForStudent/InstitutionModule/Mine/View/INSSettingBodyView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_12" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -30,7 +30,7 @@
                             </userDefinedRuntimeAttributes>
                         </imageView>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="修改头像" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BIe-ag-9eM">
-                            <rect key="frame" x="274" y="29" width="66" height="20"/>
+                            <rect key="frame" x="276.33333333333331" y="29" width="63.666666666666686" height="20"/>
                             <fontDescription key="fontDescription" type="system" pointSize="16"/>
                             <color key="textColor" red="0.66666666669999997" green="0.66666666669999997" blue="0.66666666669999997" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
@@ -141,15 +141,8 @@
                                         <constraint firstAttribute="height" constant="1" id="xTI-A0-bEz"/>
                                     </constraints>
                                 </view>
-                                <imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mine_next" translatesAutoresizingMaskIntoConstraints="NO" id="btE-3X-j5t">
-                                    <rect key="frame" x="347" y="23" width="12" height="12"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="12" id="K6K-U8-cFN"/>
-                                        <constraint firstAttribute="width" constant="12" id="Tn4-I9-siZ"/>
-                                    </constraints>
-                                </imageView>
                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="71s-LD-PL3">
-                                    <rect key="frame" x="266" y="18" width="75" height="22"/>
+                                    <rect key="frame" x="284" y="18" width="75" height="22"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="22" id="1gr-eL-iQD"/>
                                         <constraint firstAttribute="width" constant="75" id="8JD-K8-OOy"/>
@@ -166,12 +159,9 @@
                                 <constraint firstItem="YWk-05-vhU" firstAttribute="centerY" secondItem="dDj-nG-TXa" secondAttribute="centerY" id="9zP-v0-7Oe"/>
                                 <constraint firstItem="YWk-05-vhU" firstAttribute="leading" secondItem="dDj-nG-TXa" secondAttribute="leading" constant="12" id="Bvf-AJ-4HQ"/>
                                 <constraint firstAttribute="bottom" secondItem="Hzw-bW-kvK" secondAttribute="bottom" id="CGd-Sn-OL8"/>
-                                <constraint firstItem="btE-3X-j5t" firstAttribute="centerY" secondItem="dDj-nG-TXa" secondAttribute="centerY" id="CgV-0L-jAS"/>
                                 <constraint firstItem="71s-LD-PL3" firstAttribute="centerY" secondItem="dDj-nG-TXa" secondAttribute="centerY" id="Fec-z4-D1q"/>
+                                <constraint firstAttribute="trailing" secondItem="71s-LD-PL3" secondAttribute="trailing" constant="12" id="GtR-hP-Hfa"/>
                                 <constraint firstItem="Hzw-bW-kvK" firstAttribute="leading" secondItem="dDj-nG-TXa" secondAttribute="leading" constant="12" id="LWs-5q-fsA"/>
-                                <constraint firstAttribute="trailing" secondItem="btE-3X-j5t" secondAttribute="trailing" constant="12" id="fLs-aZ-jYM"/>
-                                <constraint firstItem="btE-3X-j5t" firstAttribute="leading" secondItem="71s-LD-PL3" secondAttribute="trailing" constant="6" id="jTI-0q-3LT"/>
-                                <constraint firstItem="btE-3X-j5t" firstAttribute="centerY" secondItem="dDj-nG-TXa" secondAttribute="centerY" id="lny-xF-alE"/>
                                 <constraint firstAttribute="trailing" secondItem="Hzw-bW-kvK" secondAttribute="trailing" constant="12" id="v4t-CT-pUs"/>
                             </constraints>
                             <connections>

+ 25 - 4
KulexiuForStudent/KulexiuForStudent/Module/Chat/Controller/KSChatConversationViewController.m

@@ -6,11 +6,15 @@
 //
 
 #import "KSChatConversationViewController.h"
+#import "KSPublicAlertView.h"
+
 
 @interface KSChatConversationViewController ()
 
 @property (nonatomic, strong) KSTXC2CChatViewController *vc;
 
+@property (nonatomic, strong) KSPublicAlertView *alertView;
+
 @end
 
 @implementation KSChatConversationViewController
@@ -59,11 +63,20 @@
 }
 
 - (void)requestData {
-    [KSNetworkingManager imUserFriendQueryDetail:KS_POST userId:self.conversation.userID success:^(NSDictionary * _Nonnull dic) {
-        if ([dic ks_integerValueForKey:@"code"] == 200 && [dic ks_boolValueForKey:@"status"]) {
+    [KSNetworkingManager getMessageUserRequset:KS_POST imUserId:self.conversation.userID success:^(NSDictionary * _Nonnull dic) {
+        if ([dic ks_integerValueForKey:@"code"]) {
             NSDictionary *userDic = [dic ks_dictionaryValueForKey:@"data"];
-            NSString *userName = [userDic ks_stringValueForKey:@"friendNickname"];
+            NSString *userName = [userDic ks_stringValueForKey:@"username"];
             [self allocTitle:userName];
+            BOOL isDelUser = [userDic ks_boolValueForKey:@"delFlag"];
+            if (isDelUser) {
+                MJWeakSelf;
+                self.alertView = [KSPublicAlertView shareInstanceWithTitle:@"提示" descMessage:@"该用户已注销,是否删除会话?" leftTitle:@"否" rightTitle:@"是" cancelAction:^{
+
+                } sureAction:^{
+                    [weakSelf removeCurrentConversation];
+                }];
+            }
         }
         
     } faliure:^(NSError * _Nonnull error) {
@@ -72,7 +85,15 @@
     
 }
 
-
+- (void)removeCurrentConversation {
+    MJWeakSelf;
+    NSString *conversationID = [NSString stringWithFormat:@"c2c_%@", self.conversation.userID];
+    [[V2TIMManager sharedInstance] deleteConversation:conversationID
+                                                 succ:^{
+        [weakSelf.navigationController popViewControllerAnimated:YES];
+    }
+                                                 fail:nil];
+}
 
 /*
 #pragma mark - Navigation

+ 6 - 1
KulexiuForStudent/KulexiuForStudent/Module/Chat/GroupNotice/View/GroupNoticeCell.m

@@ -55,7 +55,12 @@
         [self.userLogo sd_setImageWithURL:[NSURL URLWithString:[model.avatar getUrlEndcodeString]] placeholderImage:[UIImage imageNamed:TEACHER_AVATAR]];
         self.noticeContent.text = [NSString returnNoNullStringWithString:model.content];
         if (![NSString isEmptyString:model.content]) {
-            NSMutableAttributedString *attrs = [[NSMutableAttributedString alloc] initWithString:model.content attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14 weight:UIFontWeightRegular], NSForegroundColorAttributeName:HexRGB(0x777777)}];
+            NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+            paragraphStyle.maximumLineHeight = 21;
+            paragraphStyle.minimumLineHeight = 21;
+            UIFont *font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular];
+            CGFloat baseLineOffset = (21 - font.lineHeight) / 4;
+            NSMutableAttributedString *attrs = [[NSMutableAttributedString alloc] initWithString:model.content attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:font, NSForegroundColorAttributeName:HexRGB(0x777777), NSBaselineOffsetAttributeName:@(baseLineOffset)}];
             self.noticeContent.attributedText = attrs;
         }
         else {

+ 6 - 1
KulexiuForStudent/KulexiuForStudent/Module/Chat/GroupNotice/View/GroupNoticeDetailBodyView.m

@@ -44,7 +44,12 @@
         
         self.noticeContent.text = [NSString returnNoNullStringWithString:model.content];
         if (![NSString isEmptyString:model.content]) {
-            NSMutableAttributedString *attrs = [[NSMutableAttributedString alloc] initWithString:model.content attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14 weight:UIFontWeightRegular], NSForegroundColorAttributeName:HexRGB(0x777777)}];
+            NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+            paragraphStyle.maximumLineHeight = 21;
+            paragraphStyle.minimumLineHeight = 21;
+            UIFont *font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular];
+            CGFloat baseLineOffset = (21 - font.lineHeight) / 4;
+            NSMutableAttributedString *attrs = [[NSMutableAttributedString alloc] initWithString:model.content attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:font, NSForegroundColorAttributeName:HexRGB(0x777777), NSBaselineOffsetAttributeName:@(baseLineOffset)}];
             self.noticeContent.attributedText = attrs;
         }
         else {

+ 22 - 22
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/View/DeleteAccountBodyView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -21,13 +21,13 @@
                             <rect key="frame" x="0.0" y="0.0" width="388" height="767"/>
                             <subviews>
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TEx-cD-ZR6">
-                                    <rect key="frame" x="0.0" y="0.0" width="388" height="447.5"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="388" height="444"/>
                                     <subviews>
                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1nG-sZ-TOw">
-                                            <rect key="frame" x="0.0" y="0.0" width="388" height="447.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="388" height="444"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="将***********所绑定的账号注销" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KTf-hd-DqL">
-                                                    <rect key="frame" x="66.5" y="98" width="255" height="25"/>
+                                                    <rect key="frame" x="69" y="98" width="250.5" height="25"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="25" id="shE-jI-SbL"/>
                                                     </constraints>
@@ -36,7 +36,7 @@
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5vd-tZ-CWT">
-                                                    <rect key="frame" x="0.0" y="139" width="388" height="308.5"/>
+                                                    <rect key="frame" x="0.0" y="139" width="388" height="305"/>
                                                     <subviews>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c7e-F8-dgF">
                                                             <rect key="frame" x="20" y="0.0" width="348" height="37.5"/>
@@ -53,46 +53,46 @@
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6u6-Ma-2KR">
-                                                            <rect key="frame" x="34" y="79.5" width="334" height="44"/>
+                                                            <rect key="frame" x="34" y="79.5" width="334" height="43.5"/>
                                                             <attributedString key="attributedText">
                                                                 <fragment content="1、若已注册酷乐秀/酷乐秀学院,注销后将无法登录、使用酷乐秀/酷乐秀学院APP服务。">
                                                                     <attributes>
                                                                         <color key="NSColor" red="0.074509803921568626" green="0.078431372549019607" blue="0.082352941176470587" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                                         <font key="NSFont" size="14" name="PingFangSC-Semibold"/>
-                                                                        <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" minimumLineHeight="22" maximumLineHeight="22" tighteningFactorForTruncation="0.0"/>
+                                                                        <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="4" tighteningFactorForTruncation="0.0"/>
                                                                     </attributes>
                                                                 </fragment>
                                                             </attributedString>
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="plu-48-YfS">
-                                                            <rect key="frame" x="34" y="143.5" width="334" height="44"/>
+                                                            <rect key="frame" x="34" y="143" width="334" height="43.5"/>
                                                             <attributedString key="attributedText">
                                                                 <fragment content="2、账号下的所有内容、信息、数据、记录及绑定信息将被清空且无法找回。">
                                                                     <attributes>
                                                                         <color key="NSColor" red="0.074509803921568626" green="0.078431372549019607" blue="0.082352941176470587" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                                         <font key="NSFont" size="14" name="PingFangSC-Semibold"/>
-                                                                        <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" minimumLineHeight="22" maximumLineHeight="22" tighteningFactorForTruncation="0.0"/>
+                                                                        <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="4" tighteningFactorForTruncation="0.0"/>
                                                                     </attributes>
                                                                 </fragment>
                                                             </attributedString>
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="czQ-5I-E7e">
-                                                            <rect key="frame" x="34" y="207.5" width="334" height="44"/>
+                                                            <rect key="frame" x="34" y="206.5" width="334" height="43.5"/>
                                                             <attributedString key="attributedText">
                                                                 <fragment content="3、该账号权益信息将被清除(例如:会员时长、购买单曲、专辑信息)。">
                                                                     <attributes>
                                                                         <color key="NSColor" red="0.074509803921568626" green="0.078431372549019607" blue="0.082352941176470587" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                                         <font key="NSFont" size="14" name="PingFangSC-Semibold"/>
-                                                                        <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" minimumLineHeight="22" maximumLineHeight="22" tighteningFactorForTruncation="0.0"/>
+                                                                        <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="4" tighteningFactorForTruncation="0.0"/>
                                                                     </attributes>
                                                                 </fragment>
                                                             </attributedString>
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GBy-Z1-n96">
-                                                            <rect key="frame" x="20" y="87.5" width="6" height="6"/>
+                                                            <rect key="frame" x="20" y="86.5" width="6" height="6"/>
                                                             <color key="backgroundColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="6" id="cke-8U-65O"/>
@@ -105,7 +105,7 @@
                                                             </userDefinedRuntimeAttributes>
                                                         </view>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oHG-NB-zvk">
-                                                            <rect key="frame" x="20" y="151.5" width="6" height="6"/>
+                                                            <rect key="frame" x="20" y="150" width="6" height="6"/>
                                                             <color key="backgroundColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="6" id="dA2-vz-Te6"/>
@@ -118,7 +118,7 @@
                                                             </userDefinedRuntimeAttributes>
                                                         </view>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mjk-vg-mYk">
-                                                            <rect key="frame" x="20" y="215.5" width="6" height="6"/>
+                                                            <rect key="frame" x="20" y="213.5" width="6" height="6"/>
                                                             <color key="backgroundColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="height" constant="6" id="AsH-zk-onh"/>
@@ -140,20 +140,20 @@
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="m7X-TH-Xk6">
-                                                            <rect key="frame" x="34" y="271.5" width="334" height="22"/>
+                                                            <rect key="frame" x="34" y="270" width="334" height="20"/>
                                                             <attributedString key="attributedText">
                                                                 <fragment content="4、相关用户协议和授权协议将终止。">
                                                                     <attributes>
                                                                         <color key="NSColor" red="0.074509803921568626" green="0.078431372549019607" blue="0.082352941176470587" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                                         <font key="NSFont" size="14" name="PingFangSC-Semibold"/>
-                                                                        <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" minimumLineHeight="22" maximumLineHeight="22" tighteningFactorForTruncation="0.0"/>
+                                                                        <paragraphStyle key="NSParagraphStyle" alignment="natural" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="4" tighteningFactorForTruncation="0.0"/>
                                                                     </attributes>
                                                                 </fragment>
                                                             </attributedString>
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Wg7-Vu-y1y">
-                                                            <rect key="frame" x="20" y="279.5" width="6" height="6"/>
+                                                            <rect key="frame" x="20" y="277" width="6" height="6"/>
                                                             <color key="backgroundColor" red="0.1764705882" green="0.78039215689999997" blue="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                                             <constraints>
                                                                 <constraint firstAttribute="width" constant="6" id="EmR-7K-WKI"/>
@@ -179,18 +179,18 @@
                                                         <constraint firstAttribute="trailing" secondItem="czQ-5I-E7e" secondAttribute="trailing" constant="20" id="RGt-dD-6zV"/>
                                                         <constraint firstItem="m7X-TH-Xk6" firstAttribute="top" secondItem="czQ-5I-E7e" secondAttribute="bottom" constant="20" id="Rlj-Y1-MFO"/>
                                                         <constraint firstItem="m7X-TH-Xk6" firstAttribute="leading" secondItem="Wg7-Vu-y1y" secondAttribute="trailing" constant="8" id="SF0-6X-IQg"/>
-                                                        <constraint firstItem="oHG-NB-zvk" firstAttribute="top" secondItem="plu-48-YfS" secondAttribute="top" constant="8" id="Vit-1L-bCk"/>
+                                                        <constraint firstItem="oHG-NB-zvk" firstAttribute="top" secondItem="plu-48-YfS" secondAttribute="top" constant="7" id="Vit-1L-bCk"/>
                                                         <constraint firstItem="plu-48-YfS" firstAttribute="leading" secondItem="oHG-NB-zvk" secondAttribute="trailing" constant="8" id="WNJ-Eg-TYh"/>
                                                         <constraint firstItem="6u6-Ma-2KR" firstAttribute="leading" secondItem="GBy-Z1-n96" secondAttribute="trailing" constant="8" id="XfW-lU-uJB"/>
-                                                        <constraint firstItem="m7X-TH-Xk6" firstAttribute="top" secondItem="Wg7-Vu-y1y" secondAttribute="top" constant="-8" id="YXt-Ux-hXv"/>
+                                                        <constraint firstItem="m7X-TH-Xk6" firstAttribute="top" secondItem="Wg7-Vu-y1y" secondAttribute="top" constant="-7" id="YXt-Ux-hXv"/>
                                                         <constraint firstItem="oHG-NB-zvk" firstAttribute="leading" secondItem="5vd-tZ-CWT" secondAttribute="leading" constant="20" id="aee-FV-u0M"/>
                                                         <constraint firstItem="mjk-vg-mYk" firstAttribute="leading" secondItem="5vd-tZ-CWT" secondAttribute="leading" constant="20" id="e6v-6g-4aM"/>
                                                         <constraint firstAttribute="bottom" secondItem="m7X-TH-Xk6" secondAttribute="bottom" constant="15" id="eAj-Q2-ktE"/>
                                                         <constraint firstItem="1D8-dQ-4Em" firstAttribute="leading" secondItem="5vd-tZ-CWT" secondAttribute="leading" constant="20" id="g7Z-bS-nt6"/>
                                                         <constraint firstItem="plu-48-YfS" firstAttribute="top" secondItem="6u6-Ma-2KR" secondAttribute="bottom" constant="20" id="hzW-RT-JQz"/>
                                                         <constraint firstAttribute="trailing" secondItem="1D8-dQ-4Em" secondAttribute="trailing" constant="20" id="jla-H3-bfX"/>
-                                                        <constraint firstItem="czQ-5I-E7e" firstAttribute="top" secondItem="mjk-vg-mYk" secondAttribute="top" constant="-8" id="k8V-jQ-GSL"/>
-                                                        <constraint firstItem="GBy-Z1-n96" firstAttribute="top" secondItem="6u6-Ma-2KR" secondAttribute="top" constant="8" id="pis-9p-XXq"/>
+                                                        <constraint firstItem="czQ-5I-E7e" firstAttribute="top" secondItem="mjk-vg-mYk" secondAttribute="top" constant="-7" id="k8V-jQ-GSL"/>
+                                                        <constraint firstItem="GBy-Z1-n96" firstAttribute="top" secondItem="6u6-Ma-2KR" secondAttribute="top" constant="7" id="pis-9p-XXq"/>
                                                         <constraint firstAttribute="trailing" secondItem="m7X-TH-Xk6" secondAttribute="trailing" constant="20" id="qD3-Xr-I8G"/>
                                                         <constraint firstItem="c7e-F8-dgF" firstAttribute="leading" secondItem="5vd-tZ-CWT" secondAttribute="leading" constant="20" id="rBH-eL-pS0"/>
                                                         <constraint firstAttribute="trailing" secondItem="6u6-Ma-2KR" secondAttribute="trailing" constant="20" id="toW-r2-je8"/>

+ 14 - 19
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/View/KSDeleteFailedAlertView.m

@@ -7,6 +7,8 @@
 
 #import "KSDeleteFailedAlertView.h"
 
+#define DEL_LINE_HEIGHT (24)
+
 @interface KSDeleteFailedAlertView ()
 
 @property (weak, nonatomic) IBOutlet UIButton *sureButton;
@@ -64,7 +66,7 @@
                     make.top.mas_equalTo(self.layoutView.mas_bottom).offset(8);
                 }
                 make.left.right.mas_equalTo(self.tipsContainer);
-                make.height.mas_equalTo(24);
+                make.height.mas_equalTo(20);
             }];
             self.layoutView = clientStuTitle;
             
@@ -83,19 +85,19 @@
             }
             NSString *newString = [NSString returnNoNullStringWithString:[array componentsJoinedByString:@"\n"]];
             NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
-            paragraphStyle.maximumLineHeight = 24;
-            paragraphStyle.minimumLineHeight = 24;
-            NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:newString attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:14.0f],NSForegroundColorAttributeName:HexRGB(0x666666)}];
+            paragraphStyle.maximumLineHeight = DEL_LINE_HEIGHT;
+            paragraphStyle.minimumLineHeight = DEL_LINE_HEIGHT;
+            UIFont *font = [UIFont systemFontOfSize:14.0f];
+            CGFloat baseLineOffset = (DEL_LINE_HEIGHT - font.lineHeight) / 2;
+            NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:newString attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:font,NSForegroundColorAttributeName:HexRGB(0x666666), NSBaselineOffsetAttributeName:@(baseLineOffset)}];
             
             UILabel *errorTipsLabel = [[UILabel alloc] initWithFrame:CGRectZero];
             errorTipsLabel.numberOfLines = 0;
             [self.scrollView addSubview:errorTipsLabel];
             errorTipsLabel.attributedText = attr;
-            CGFloat height = [self getLabelHeight:newString];
             [errorTipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
                 make.left.right.mas_equalTo(self.tipsContainer);
                 make.top.mas_equalTo(self.layoutView.mas_bottom);
-                make.height.mas_equalTo(height);
                 if (isLast) {
                     make.bottom.mas_equalTo(self.scrollView.mas_bottom);
                 }
@@ -116,7 +118,7 @@
                 else {
                     make.top.mas_equalTo(self.layoutView.mas_bottom).offset(8);
                 }
-                make.height.mas_equalTo(24);
+                make.height.mas_equalTo(20);
             }];
             self.layoutView = clientTeaTitle;
             
@@ -135,20 +137,20 @@
             }
             NSString *newString = [NSString returnNoNullStringWithString:[array componentsJoinedByString:@"\n"]];
             NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
-            paragraphStyle.maximumLineHeight = 24;
-            paragraphStyle.minimumLineHeight = 24;
-            NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:newString attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:14.0f],NSForegroundColorAttributeName:HexRGB(0x666666)}];
+            paragraphStyle.maximumLineHeight = DEL_LINE_HEIGHT;
+            paragraphStyle.minimumLineHeight = DEL_LINE_HEIGHT;
+            UIFont *font = [UIFont systemFontOfSize:14.0f];
+            CGFloat baseLineOffset = (DEL_LINE_HEIGHT - font.lineHeight) / 2;
+            NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:newString attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:font,NSForegroundColorAttributeName:HexRGB(0x666666), NSBaselineOffsetAttributeName:@(baseLineOffset)}];
             
             UILabel *errorTipsLabel = [[UILabel alloc] initWithFrame:CGRectZero];
             errorTipsLabel.numberOfLines = 0;
             [self.scrollView addSubview:errorTipsLabel];
             errorTipsLabel.attributedText = attr;
-            CGFloat height = [self getLabelHeight:newString];
 
             [errorTipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
                 make.left.right.mas_equalTo(self.tipsContainer);
                 make.top.mas_equalTo(self.layoutView.mas_bottom);
-                make.height.mas_equalTo(height);
                 if (isLast) {
                     make.bottom.mas_equalTo(self.scrollView.mas_bottom);
                 }
@@ -159,13 +161,6 @@
     [self setNeedsLayout];
 }
 
-- (CGFloat)getLabelHeight:(NSString *)desc {
-    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
-    paragraphStyle.maximumLineHeight = 24;
-    paragraphStyle.minimumLineHeight = 24;
-    return [desc boundingRectWithSize:CGSizeMake(265, CGFLOAT_MAX) options:(NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading) attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:14.0f],NSForegroundColorAttributeName:HexRGB(0x666666)} context:nil].size.height + 1;
-}
-
 - (void)layoutSubviews {
     [super layoutSubviews];
     CGFloat contentHeight = CGRectGetMaxY(self.layoutView.frame); // 10是底部留白

+ 4 - 4
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/DeleteAccount/View/KSDeleteFailedAlertView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23094" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_12" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23084"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -18,7 +18,7 @@
                     <rect key="frame" x="44" y="189" width="305" height="474"/>
                     <subviews>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="注销失败" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PVB-qM-x6a">
-                            <rect key="frame" x="115.66666666666666" y="20" width="73.666666666666657" height="25"/>
+                            <rect key="frame" x="116.66666666666666" y="20" width="71.666666666666657" height="25"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="25" id="5Ls-7e-acn"/>
                             </constraints>
@@ -26,7 +26,7 @@
                             <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="该账户需处理以下事项后再进行注销:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8w7-2y-inS">
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="该账户需处理以下事项后再进行注销:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8w7-2y-inS">
                             <rect key="frame" x="20" y="65" width="265" height="24"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="24" id="YDH-Mj-MAN"/>

+ 5 - 1
KulexiuForStudent/Pods/TUIChat/TXGroupNoticeMessage.m

@@ -31,8 +31,12 @@
     CGFloat width = ([UIScreen mainScreen].bounds.size.width > [UIScreen mainScreen].bounds.size.height ? [UIScreen mainScreen].bounds.size.height : [UIScreen mainScreen].bounds.size.width);
 
     if (![self isEmptyString:self.msgContent]) {
+        NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+        paragraphStyle.maximumLineHeight = 21;
+        paragraphStyle.minimumLineHeight = 21;
+        UIFont *font = [UIFont systemFontOfSize:16.0f];
         
-        CGFloat height = [self.msgContent boundingRectWithSize:CGSizeMake(225, CGFLOAT_MAX) options:(NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading) attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15.0f],NSForegroundColorAttributeName:TXHexRGB(0x333333)} context:nil].size.height + 1;
+        CGFloat height = [self.msgContent boundingRectWithSize:CGSizeMake(221, CGFLOAT_MAX) options:(NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading) attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:font,NSForegroundColorAttributeName:TXHexRGB(0x333333)} context:nil].size.height + 1;
         CGFloat contentHeight = height + 64 + 11;
         return CGSizeMake(width, contentHeight);
     }

+ 12 - 8
KulexiuForStudent/Pods/TUIChat/TXGroupNoticeMessageCell.m

@@ -31,7 +31,7 @@
     [self.noticeContentView mas_remakeConstraints:^(MASConstraintMaker *make) {
         make.left.mas_equalTo(self.avatarView.mas_right).offset(10);
         make.top.mas_equalTo(self.avatarView.mas_top);
-        make.width.mas_equalTo(249);
+        make.width.mas_equalTo(245);
         make.bottom.mas_equalTo(self.container.mas_bottom).offset(-10);
     }];
 }
@@ -44,7 +44,7 @@
         [self.noticeContentView mas_remakeConstraints:^(MASConstraintMaker *make) {
             make.left.mas_equalTo(self.avatarView.mas_right).offset(10);
             make.top.mas_equalTo(self.avatarView.mas_top);
-            make.width.mas_equalTo(249);
+            make.width.mas_equalTo(245);
             make.height.mas_equalTo(height);
         }];
     }
@@ -52,7 +52,7 @@
         [self.noticeContentView mas_remakeConstraints:^(MASConstraintMaker *make) {
             make.right.mas_equalTo(self.avatarView.mas_left).offset(-10);
             make.top.mas_equalTo(self.avatarView.mas_top);
-            make.width.mas_equalTo(249);
+            make.width.mas_equalTo(245);
             make.height.mas_equalTo(height);
         }];
     }
@@ -62,9 +62,10 @@
     TXGroupNoticeMessage *noticeMsg = (TXGroupNoticeMessage *)data;
     if (![TXGroupNoticeMessageCell isEmptyString:noticeMsg.msgContent]) {
         NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
-        [paragraphStyle setLineSpacing:4];//调整行间距
-        
-        CGFloat height = [noticeMsg.msgContent boundingRectWithSize:CGSizeMake(225, CGFLOAT_MAX) options:(NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading) attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15.0f]} context:nil].size.height + 1;
+        paragraphStyle.maximumLineHeight = 21;
+        paragraphStyle.minimumLineHeight = 21;
+        UIFont *font = [UIFont systemFontOfSize:16.0f];
+        CGFloat height = [noticeMsg.msgContent boundingRectWithSize:CGSizeMake(221, CGFLOAT_MAX) options:(NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading) attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:font} context:nil].size.height + 1;
         CGFloat contentHeight = height + 64 + 11;
         return contentHeight;
     }
@@ -91,8 +92,11 @@
     TXGroupNoticeMessage *noticeMsg = (TXGroupNoticeMessage *)data;
     CGFloat width = ([UIScreen mainScreen].bounds.size.width > [UIScreen mainScreen].bounds.size.height ? [UIScreen mainScreen].bounds.size.height : [UIScreen mainScreen].bounds.size.width);
     if (![self isEmptyString:noticeMsg.msgContent]) {
-        
-        CGFloat height = [noticeMsg.msgContent boundingRectWithSize:CGSizeMake(225, CGFLOAT_MAX) options:(NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading) attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15.0f]} context:nil].size.height + 6;
+        NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+        paragraphStyle.maximumLineHeight = 21;
+        paragraphStyle.minimumLineHeight = 21;
+        UIFont *font = [UIFont systemFontOfSize:16.0f];
+        CGFloat height = [noticeMsg.msgContent boundingRectWithSize:CGSizeMake(221, CGFLOAT_MAX) options:(NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading) attributes:@{NSFontAttributeName:font,NSParagraphStyleAttributeName:paragraphStyle} context:nil].size.height + 6;
         CGFloat contentHeight = height + 64 + 11;
         return CGSizeMake(width, contentHeight);
     }

+ 10 - 4
KulexiuForStudent/Pods/TUIChat/TXGroupNoticeMessageContentView.m

@@ -75,7 +75,13 @@
 - (void)configCellWithMsgTitle:(NSString *)title content:(NSString *)content {
     self.msgTitleLabel.text = [self returnNoNullStringWithString:title];
     if (![self isEmptyString:content]) {
-        NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:content attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15.0f],NSForegroundColorAttributeName:TXHexRGB(0x333333)}];
+        NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+        paragraphStyle.maximumLineHeight = 21;
+        paragraphStyle.minimumLineHeight = 21;
+        UIFont *font = [UIFont systemFontOfSize:16.0f];
+        CGFloat baseLineOffset = (21 - font.lineHeight) / 4;
+        
+        NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:content attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:font,NSForegroundColorAttributeName:TXHexRGB(0x333333),NSBaselineOffsetAttributeName:@(baseLineOffset)}];
         self.msgContentLabel.attributedText = attr;
     }
     else {
@@ -117,7 +123,7 @@
     if (!_noticedTopTitle) {
         _noticedTopTitle = [[UILabel alloc] init];
         _noticedTopTitle.textColor = TXHexRGB(0x19B396);
-        _noticedTopTitle.font = [UIFont systemFontOfSize:15.0f weight:UIFontWeightRegular];
+        _noticedTopTitle.font = [UIFont systemFontOfSize:16.0f weight:UIFontWeightRegular];
         _noticedTopTitle.text = @"群公告";
     }
     return _noticedTopTitle;
@@ -127,7 +133,7 @@
     if (!_msgTitleLabel) {
         _msgTitleLabel = [[UILabel alloc] init];
         _msgTitleLabel.textColor = TXHexRGB(0x333333);
-        _msgTitleLabel.font = [UIFont systemFontOfSize:15.0f weight:UIFontWeightSemibold];
+        _msgTitleLabel.font = [UIFont systemFontOfSize:16.0f weight:UIFontWeightSemibold];
     }
     return _msgTitleLabel;
 }
@@ -136,7 +142,7 @@
     if (!_msgContentLabel) {
         _msgContentLabel = [[UILabel alloc] init];
         _msgContentLabel.textColor = TXHexRGB(0x333333);
-        _msgContentLabel.font = [UIFont systemFontOfSize:15.0f weight:UIFontWeightRegular];
+        _msgContentLabel.font = [UIFont systemFontOfSize:16.0f weight:UIFontWeightRegular];
         _msgContentLabel.numberOfLines = 0;
     }
     return _msgContentLabel;