Steven vor 7 Monaten
Ursprung
Commit
0377117af4

+ 4 - 5
KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/CourseTeacherDescCell.m

@@ -9,6 +9,7 @@
 #import "KSStarView.h"
 
 @interface CourseTeacherDescCell ()
+@property (weak, nonatomic) IBOutlet UILabel *tagLabel;
 
 @property (weak, nonatomic) IBOutlet KSStarView *starView;
 
@@ -58,14 +59,12 @@
     double price = [model.subjectPrice doubleValue];
     if (price > 0) {
         NSString *mountMsg = [NSString formatDoubleNum:price];
-        NSString *descMsg = [NSString stringWithFormat:@"¥%@",mountMsg];
-        
-        NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:descMsg attributes:@{NSFontAttributeName:[UIFont fontWithName:@"DIN Alternate Bold" size:14.0f],NSForegroundColorAttributeName:HexRGB(0xF44541)}];
-        [attr addAttributes:@{NSFontAttributeName:[UIFont fontWithName:@"DIN Alternate Bold" size:18.0f]} range:[descMsg rangeOfString:mountMsg]];
-        self.priceLabel.attributedText = attr;
+        self.priceLabel.text = mountMsg;
+        self.tagLabel.hidden = NO;
     }
     else {
         self.priceLabel.text = @"免费";
+        self.tagLabel.hidden = YES;
     }
 }
 

+ 15 - 2
KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/CourseTeacherDescCell.xib

@@ -89,8 +89,8 @@
                                 <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥ 100.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="14o-Dv-2M4">
-                                <rect key="frame" x="228.66666666666666" y="60" width="60.666666666666657" height="21"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="100.00" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="14o-Dv-2M4">
+                                <rect key="frame" x="241.66666666666666" y="60" width="47.666666666666657" height="21"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="21" id="l3t-yK-rvz"/>
                                 </constraints>
@@ -107,6 +107,15 @@
                                 <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" 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="vnz-ny-LSC">
+                                <rect key="frame" x="232.66666666666666" y="64" width="7" height="16"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="16" id="MJU-iu-Jft"/>
+                                </constraints>
+                                <fontDescription key="fontDescription" name="DINAlternate-Bold" family="DIN Alternate" pointSize="14"/>
+                                <color key="textColor" red="0.95686274510000002" green="0.27058823529999998" blue="0.25490196079999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
                         </subviews>
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
@@ -117,14 +126,17 @@
                             <constraint firstItem="EAh-FG-nIZ" firstAttribute="leading" secondItem="L4X-4j-TAS" secondAttribute="leading" constant="12" id="DsS-f7-EtI"/>
                             <constraint firstItem="5fv-Zu-mpb" firstAttribute="centerY" secondItem="kSc-Bn-tRF" secondAttribute="centerY" id="F7P-fW-fRe"/>
                             <constraint firstItem="kQq-1l-JW1" firstAttribute="leading" secondItem="VcT-no-hdl" secondAttribute="trailing" constant="4" id="FtU-yM-3mE"/>
+                            <constraint firstItem="14o-Dv-2M4" firstAttribute="leading" secondItem="vnz-ny-LSC" secondAttribute="trailing" constant="2" id="HOx-l6-YON"/>
                             <constraint firstAttribute="trailing" secondItem="TOg-Vl-8yz" secondAttribute="trailing" constant="12" id="Hbg-0s-54b"/>
                             <constraint firstAttribute="trailing" secondItem="wAx-0C-FLk" secondAttribute="trailing" constant="12" id="HhT-HG-0n3"/>
                             <constraint firstItem="EAh-FG-nIZ" firstAttribute="centerY" secondItem="L4X-4j-TAS" secondAttribute="centerY" id="OnS-3f-0Ut"/>
                             <constraint firstAttribute="bottom" secondItem="14o-Dv-2M4" secondAttribute="bottom" constant="13" id="XbV-al-MfW"/>
                             <constraint firstItem="wAx-0C-FLk" firstAttribute="top" secondItem="kSc-Bn-tRF" secondAttribute="bottom" constant="4" id="XgW-i3-DQ9"/>
                             <constraint firstItem="wAx-0C-FLk" firstAttribute="leading" secondItem="EAh-FG-nIZ" secondAttribute="trailing" constant="12" id="cok-gl-jCk"/>
+                            <constraint firstItem="14o-Dv-2M4" firstAttribute="bottom" secondItem="vnz-ny-LSC" secondAttribute="bottom" constant="1" id="egl-nX-nvq"/>
                             <constraint firstAttribute="trailing" secondItem="foG-ZX-f0E" secondAttribute="trailing" constant="12" id="eyD-ZO-KsZ"/>
                             <constraint firstItem="VcT-no-hdl" firstAttribute="leading" secondItem="EAh-FG-nIZ" secondAttribute="trailing" constant="12" id="fS9-Yc-O4U"/>
+                            <constraint firstItem="vnz-ny-LSC" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="kQq-1l-JW1" secondAttribute="trailing" constant="4" id="t1L-rq-YgT"/>
                             <constraint firstItem="kSc-Bn-tRF" firstAttribute="leading" secondItem="EAh-FG-nIZ" secondAttribute="trailing" constant="12" id="w8s-1K-2cE"/>
                             <constraint firstItem="kSc-Bn-tRF" firstAttribute="top" secondItem="L4X-4j-TAS" secondAttribute="top" constant="14" id="y8f-kQ-773"/>
                             <constraint firstItem="kQq-1l-JW1" firstAttribute="centerY" secondItem="VcT-no-hdl" secondAttribute="centerY" id="y9Z-gi-Jvf"/>
@@ -151,6 +163,7 @@
                 <outlet property="noStarLabel" destination="foG-ZX-f0E" id="tLq-rh-wlh"/>
                 <outlet property="priceLabel" destination="14o-Dv-2M4" id="OyV-af-Idv"/>
                 <outlet property="starView" destination="RQI-Hg-dao" id="Tn4-Ul-ZLq"/>
+                <outlet property="tagLabel" destination="vnz-ny-LSC" id="Git-uY-KS1"/>
                 <outlet property="teacherAvatar" destination="EAh-FG-nIZ" id="BP7-Ey-KML"/>
                 <outlet property="teacherDesc" destination="wAx-0C-FLk" id="Pb4-WY-jcR"/>
                 <outlet property="teacherName" destination="kSc-Bn-tRF" id="afu-nS-0zX"/>

+ 4 - 5
KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/LiveCourseArrangeCell.m

@@ -8,6 +8,7 @@
 #import "LiveCourseArrangeCell.h"
 
 @interface LiveCourseArrangeCell ()
+@property (weak, nonatomic) IBOutlet UILabel *tagLabel;
 
 @property (weak, nonatomic) IBOutlet UILabel *courseStartTime;
 
@@ -54,13 +55,11 @@
     
     if (model.coursePrice > 0) {
         NSString *mountMsg = [NSString formatDoubleNum:model.coursePrice];
-        NSString *descMsg = [NSString stringWithFormat:@"¥%@",mountMsg];
-        
-        NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:descMsg attributes:@{NSFontAttributeName:[UIFont fontWithName:@"DIN Alternate Bold" size:14.0f],NSForegroundColorAttributeName:HexRGB(0xF44541)}];
-        [attr addAttributes:@{NSFontAttributeName:[UIFont fontWithName:@"DIN Alternate Bold" size:18.0f]} range:[descMsg rangeOfString:mountMsg]];
-        self.priceLabel.attributedText = attr;
+        self.priceLabel.text = mountMsg;
+        self.tagLabel.hidden = NO;
     }
     else {
+        self.tagLabel.hidden = YES;
         self.priceLabel.text = [NSString  stringWithFormat:@"免费"];
     }
     

+ 16 - 4
KulexiuForStudent/KulexiuForStudent/Module/Home/ArrangeCourse/View/LiveCourseArrangeCell.xib

@@ -94,8 +94,8 @@
                                 <color key="textColor" red="0.46666666670000001" green="0.46666666670000001" blue="0.46666666670000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FTk-RK-PpI">
-                                <rect key="frame" x="264" y="278" width="0.0" height="24"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" text="200" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FTk-RK-PpI">
+                                <rect key="frame" x="235" y="278" width="29" height="24"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="24" id="iJt-Ll-uCa"/>
                                 </constraints>
@@ -113,7 +113,10 @@
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EV0-5G-Zqo">
-                                <rect key="frame" x="44" y="290" width="0.0" height="0.0"/>
+                                <rect key="frame" x="44" y="280" width="0.0" height="20"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="20" id="Qgb-HR-Ucu"/>
+                                </constraints>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                 <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <nil key="highlightedColor"/>
@@ -130,6 +133,12 @@
                                     </userDefinedRuntimeAttribute>
                                 </userDefinedRuntimeAttributes>
                             </imageView>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="752" text="¥" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kmf-67-UiN">
+                                <rect key="frame" x="226" y="283" width="7" height="17"/>
+                                <fontDescription key="fontDescription" name="DINAlternate-Bold" family="DIN Alternate" pointSize="14"/>
+                                <color key="textColor" red="0.95686274510000002" green="0.27058823529999998" blue="0.25490196079999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                <nil key="highlightedColor"/>
+                            </label>
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <constraints>
@@ -138,6 +147,8 @@
                             <constraint firstItem="7jr-Mq-1qA" firstAttribute="bottom" secondItem="FTk-RK-PpI" secondAttribute="bottom" constant="-2" id="3Sz-NQ-9ik"/>
                             <constraint firstItem="PZN-ZY-dhJ" firstAttribute="top" secondItem="fxd-IB-bWS" secondAttribute="top" constant="8" id="6Mj-hE-DEA"/>
                             <constraint firstItem="kob-BR-mDx" firstAttribute="leading" secondItem="pOD-tU-dw9" secondAttribute="leading" constant="12" id="7nH-qY-JPo"/>
+                            <constraint firstItem="FTk-RK-PpI" firstAttribute="bottom" secondItem="kmf-67-UiN" secondAttribute="bottom" constant="2" id="99Q-XL-JTo"/>
+                            <constraint firstItem="FTk-RK-PpI" firstAttribute="leading" secondItem="kmf-67-UiN" secondAttribute="trailing" constant="2" id="A87-GW-fz7"/>
                             <constraint firstAttribute="trailing" secondItem="kob-BR-mDx" secondAttribute="trailing" constant="12" id="C7U-7p-EJl"/>
                             <constraint firstAttribute="bottom" secondItem="7jr-Mq-1qA" secondAttribute="bottom" constant="15" id="IdI-O4-0bL"/>
                             <constraint firstItem="dGU-cY-gNI" firstAttribute="leading" secondItem="6DL-8w-1GF" secondAttribute="trailing" id="LqI-OV-Lgt"/>
@@ -155,13 +166,13 @@
                             <constraint firstItem="fxd-IB-bWS" firstAttribute="top" secondItem="Nss-l5-qsr" secondAttribute="bottom" constant="15" id="feR-v4-vgy"/>
                             <constraint firstItem="EV0-5G-Zqo" firstAttribute="centerY" secondItem="XMD-jO-43x" secondAttribute="centerY" id="fxc-N6-781"/>
                             <constraint firstItem="6DL-8w-1GF" firstAttribute="leading" secondItem="Nss-l5-qsr" secondAttribute="trailing" constant="7" id="iJu-6u-OIT"/>
-                            <constraint firstItem="FTk-RK-PpI" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="EV0-5G-Zqo" secondAttribute="trailing" constant="10" id="imF-an-jnG"/>
                             <constraint firstItem="Nss-l5-qsr" firstAttribute="top" secondItem="pOD-tU-dw9" secondAttribute="top" constant="15" id="j7o-QY-U4Q"/>
                             <constraint firstItem="kob-BR-mDx" firstAttribute="top" secondItem="QcX-ab-zdn" secondAttribute="bottom" constant="4" id="mPB-sC-sOn"/>
                             <constraint firstItem="EV0-5G-Zqo" firstAttribute="leading" secondItem="XMD-jO-43x" secondAttribute="trailing" constant="6" id="oML-gU-N14"/>
                             <constraint firstItem="dGU-cY-gNI" firstAttribute="centerY" secondItem="6DL-8w-1GF" secondAttribute="centerY" id="rip-RP-TzF"/>
                             <constraint firstItem="fxd-IB-bWS" firstAttribute="leading" secondItem="pOD-tU-dw9" secondAttribute="leading" constant="12" id="sNs-aG-qv9"/>
                             <constraint firstItem="7jr-Mq-1qA" firstAttribute="leading" secondItem="FTk-RK-PpI" secondAttribute="trailing" constant="2" id="vUy-qO-Ghm"/>
+                            <constraint firstItem="kmf-67-UiN" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="EV0-5G-Zqo" secondAttribute="trailing" constant="10" id="zV9-Nq-i6T"/>
                         </constraints>
                         <userDefinedRuntimeAttributes>
                             <userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
@@ -187,6 +198,7 @@
                 <outlet property="courseStartTime" destination="dGU-cY-gNI" id="w7O-ic-94o"/>
                 <outlet property="priceLabel" destination="FTk-RK-PpI" id="BOy-Cf-2Oa"/>
                 <outlet property="subjectLabel" destination="PM9-PV-hbP" id="hsf-b2-tUW"/>
+                <outlet property="tagLabel" destination="kmf-67-UiN" id="h44-AK-L93"/>
                 <outlet property="teacherAvatar" destination="XMD-jO-43x" id="Xmc-GB-orL"/>
                 <outlet property="teacherName" destination="EV0-5G-Zqo" id="5ey-2N-aJc"/>
             </connections>