Procházet zdrojové kódy

消息最多显示2行

Steven před 3 roky
rodič
revize
05cc625e4d

binární
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferMessageCell.m

@@ -46,6 +46,8 @@
     NSString *messgage = [NSString returnNoNullStringWithString:self.model.content];
     NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
     [paragraphStyle setLineSpacing:4];//调整行间距
+    paragraphStyle.lineBreakMode = NSLineBreakByTruncatingTail;
+    
     NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:messgage attributes:@{NSParagraphStyleAttributeName:paragraphStyle,NSFontAttributeName:[UIFont systemFontOfSize:13.0f],NSForegroundColorAttributeName:HexRGB(0x7a7a7a)}];
     self.descMessageLabel.attributedText = attrStr;
     NSString *imgName = [self getTypeImageWithSubType:model.subType];

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Home/NotiferMessage/View/NotiferMessageCell.xib

@@ -37,7 +37,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="您好,长笛基础教学·李老师的直播课60分钟后…教学·李老师的直播课60分钟后…" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aCp-hw-uSQ">
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="您好,长笛基础教学·李老师的直播课60分钟后…教学·李老师的直播课60分钟后…" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aCp-hw-uSQ">
                         <rect key="frame" x="70" y="46" width="339" height="40"/>
                         <fontDescription key="fontDescription" type="system" pointSize="14"/>
                         <color key="textColor" red="0.47843137254901957" green="0.47843137254901957" blue="0.47843137254901957" alpha="1" colorSpace="calibratedRGB"/>

+ 1 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/MinePage/View/MinePageTopView.xib

@@ -65,7 +65,7 @@
                                 <constraint firstAttribute="width" constant="60" id="5Lv-mb-fqw"/>
                                 <constraint firstAttribute="height" constant="28" id="dDW-No-JUn"/>
                             </constraints>
-                            <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                            <fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" title="编辑">
                                 <color key="titleColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="calibratedRGB"/>