Procházet zdrojové kódy

点赞界面UI 完善

SuperC před 1 rokem
rodič
revize
4dd0fb89ca

binární
MiMoLive/MiMoLive.xcworkspace/xcuserdata/yanxuyao.xcuserdatad/UserInterfaceState.xcuserstate


+ 40 - 31
MiMoLive/MiMoLive/Classes/Live/View/MOClick/MOLikeListView/MOLikeListCell.m

@@ -32,15 +32,15 @@
     
     [self.bgView addSubview:self.sortBtn];
     [self.sortBtn mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.width.equalTo(@18.0);
-        make.height.equalTo(@18.0);
-        make.left.equalTo(self.bgView).offset(8.0);
+        make.width.equalTo(@28.0);
+        make.height.equalTo(@28.0);
+        make.left.equalTo(self.bgView).offset(5.0);
         make.centerY.equalTo(self.bgView.mas_centerY);
     }];
     
     [self.bgView addSubview:self.headImg];
     [self.headImg mas_makeConstraints:^(MASConstraintMaker *make) {
-        make.left.equalTo(self.sortBtn.mas_right).offset(5.0);
+        make.left.equalTo(self.sortBtn.mas_right).offset(10.0);
         make.centerY.equalTo(self.bgView.mas_centerY);
         make.height.width.equalTo(@48.0);
     }];
@@ -89,6 +89,15 @@
         make.height.equalTo(@14.0);
     }];
     
+    UIView *lineView = [[UIView alloc] init];
+    lineView.backgroundColor = [MOTools colorWithHexString:@"#DBDBDB" alpha:1.0];
+    [self.bgView addSubview:lineView];
+    [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.equalTo(self.headImg.mas_right);
+        make.right.bottom.equalTo(self.bgView);
+        make.height.equalTo(@0.5);
+    }];
+    
 }
 
 - (void)awakeFromNib {
@@ -126,44 +135,44 @@
     }
     
     self.sortBtn.hidden = NO;
+    self.crownImg.hidden = YES;
     [self.sortBtn setTitle:@"" forState:UIControlStateNormal];
     
-    CGFloat sortBtnWidth = 18.0;
+//    CGFloat sortBtnWidth = 18.0;
     
     if(self.cellIndexPath.section == 0){
-        [self.sortBtn setBackgroundImage:[UIImage imageNamed:@"icon_half_hour_one"] forState:UIControlStateNormal];
-        [self.crownImg setImage:[UIImage imageNamed:@"icon_half_hour_jin"]];
+        [self.sortBtn setImage:[UIImage imageNamed:@"icon_voice_rank_jin"] forState:UIControlStateNormal];
+//        [self.crownImg setImage:[UIImage imageNamed:@"icon_half_hour_jin"]];
     }
     else if (self.cellIndexPath.section == 1){
-        [self.sortBtn setBackgroundImage:[UIImage imageNamed:@"icon_half_hour_two"] forState:UIControlStateNormal];
-        [self.crownImg setImage:[UIImage imageNamed:@"icon_half_hour_yin"]];
+        [self.sortBtn setImage:[UIImage imageNamed:@"icon_voice_rank_yin"] forState:UIControlStateNormal];
+//        [self.crownImg setImage:[UIImage imageNamed:@"icon_half_hour_yin"]];
     }
     else if (self.cellIndexPath.section == 2){
-        [self.sortBtn setBackgroundImage:[UIImage imageNamed:@"icon_half_hour_three"] forState:UIControlStateNormal];
-        [self.crownImg setImage:[UIImage imageNamed:@"icon_half_hour_tong"]];
+        [self.sortBtn setImage:[UIImage imageNamed:@"icon_voice_rank_tong"] forState:UIControlStateNormal];
+//        [self.crownImg setImage:[UIImage imageNamed:@"icon_half_hour_tong"]];
     }
     else{
-        [self.sortBtn setBackgroundImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
-        self.crownImg.hidden = YES;
+        [self.sortBtn setImage:[UIImage imageNamed:@""] forState:UIControlStateNormal];
         NSInteger sortNum = self.cellIndexPath.section + 1;
         NSString *sortStr = [NSString stringWithFormat:@"%zd",sortNum];
-        sortBtnWidth = [MOTools getWidthWithString:sortStr font:[UIFont boldSystemFontOfSize:12.0]] + 3.0;
+//        sortBtnWidth = [MOTools getWidthWithString:sortStr font:[UIFont boldSystemFontOfSize:12.0]] + 3.0;
         [self.sortBtn setTitle:[NSString stringWithFormat:@"%zd",sortNum] forState:UIControlStateNormal];
     }
     
-    if(sortBtnWidth < 18.0){
-        sortBtnWidth = 18.0;
-    }
-    
-    if(sortBtnWidth > 40.0){
-        sortBtnWidth = 40.0;
-    }
-    
+//    if(sortBtnWidth < 18.0){
+//        sortBtnWidth = 18.0;
+//    }
+//    
+//    if(sortBtnWidth > 40.0){
+//        sortBtnWidth = 40.0;
+//    }
+//    
     self.contentLab.text = [NSString stringWithFormat:@"%.f like",cellModel.like];
-    
-    [self.sortBtn mas_updateConstraints:^(MASConstraintMaker *make) {
-        make.width.equalTo(@(sortBtnWidth));
-    }];
+//    
+//    [self.sortBtn mas_updateConstraints:^(MASConstraintMaker *make) {
+//        make.width.equalTo(@(sortBtnWidth));
+//    }];
     
     if(cellModel.userBase.userProfile.adornment.headdress.length > 0){
         self.headBgView.hidden = NO;
@@ -197,8 +206,8 @@
         _sortBtn.imageView.contentMode = UIViewContentModeScaleAspectFill;
         _sortBtn.imageView.layer.masksToBounds = YES;
         _sortBtn.userInteractionEnabled = NO;
-        [_sortBtn setFont:[UIFont boldSystemFontOfSize:12.0]];
-        [_sortBtn setTitleColor:[MOTools colorWithHexString:@"#BCBCBC" alpha:1.0] forState:UIControlStateNormal];
+        [_sortBtn setFont:[MOTextTools getTheFontWithSize:20.0 AndFontName:@"Akrobat"]];
+        [_sortBtn setTitleColor:[MOTools colorWithHexString:@"#737373" alpha:1.0] forState:UIControlStateNormal];
     }
     return _sortBtn;
 }
@@ -233,7 +242,7 @@
     {
         _nameLab = [[UILabel alloc] init];
         _nameLab.text = @"";
-        _nameLab.font = [UIFont systemFontOfSize:14.0];
+        _nameLab.font = [MOTextTools getTheFontWithSize:13.0 AndFontName:@"Akrobat"];
         _nameLab.textColor = [MOTools colorWithHexString:@"#000000" alpha:1.0];
         _nameLab.textAlignment = NSTextAlignmentLeft;
  
@@ -255,8 +264,8 @@
     {
         _contentLab = [[UILabel alloc] init];
         _contentLab.text = @"";
-        _contentLab.font = [UIFont systemFontOfSize:10.0];
-        _contentLab.textColor = [MOTools colorWithHexString:@"#FFB637" alpha:1.0];
+        _contentLab.font = [MOTextTools getTheFontWithSize:13.0 AndFontName:@"Akrobat"];
+        _contentLab.textColor = [MOTools colorWithHexString:@"#FACB52" alpha:1.0];
         _contentLab.textAlignment = NSTextAlignmentLeft;
  
     }

+ 6 - 0
MiMoLive/MiMoLive/Classes/Live/View/MOClick/MOLikeListView/MOLikeListRuleView.m

@@ -9,6 +9,9 @@
 
 @interface MOLikeListRuleView ()
 
+
+@property (weak, nonatomic) IBOutlet UILabel *titleLab;
+
 @property (weak, nonatomic) IBOutlet UITextView *textView;
 
 @end
@@ -28,6 +31,9 @@
     
     self.textView.text = NSLocalString(@"mimo_room_like_list_rule_tip");
     
+    self.titleLab.font = [MOTextTools getTheFontWithSize:16.0 AndFontName:@"Gilroy"];
+    
+    [self.textView setFont:[MOTextTools getTheFontWithSize:14.0 AndFontName:@"Akrobat"]];
 }
 
 - (IBAction)closeBtnClick:(id)sender {

+ 6 - 5
MiMoLive/MiMoLive/Classes/Live/View/MOClick/MOLikeListView/MOLikeListRuleView.xib

@@ -32,7 +32,7 @@
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Rules" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TJt-s3-1dQ">
                             <rect key="frame" x="55" y="16.666666666666668" width="283" height="17.000000000000004"/>
                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                            <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <color key="textColor" red="0.15686274509803921" green="0.15686274509803921" blue="0.15686274509803921" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
                     </subviews>
@@ -46,8 +46,8 @@
                         <constraint firstItem="6jy-AE-oeY" firstAttribute="leading" secondItem="zkH-bi-eM4" secondAttribute="leading" constant="20" id="uRX-2e-fMn"/>
                     </constraints>
                 </view>
-                <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="tsS-zO-9nC">
-                    <rect key="frame" x="10" y="50" width="373" height="339"/>
+                <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="tsS-zO-9nC">
+                    <rect key="frame" x="20" y="50" width="353" height="339"/>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <fontDescription key="fontDescription" type="system" pointSize="14"/>
@@ -56,17 +56,18 @@
             </subviews>
             <color key="backgroundColor" systemColor="systemBackgroundColor"/>
             <constraints>
-                <constraint firstAttribute="trailing" secondItem="tsS-zO-9nC" secondAttribute="trailing" constant="10" id="8os-hT-HIw"/>
+                <constraint firstAttribute="trailing" secondItem="tsS-zO-9nC" secondAttribute="trailing" constant="20" id="8os-hT-HIw"/>
                 <constraint firstItem="zkH-bi-eM4" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="IWP-pm-osR"/>
                 <constraint firstAttribute="trailing" secondItem="zkH-bi-eM4" secondAttribute="trailing" id="Pde-py-k6X"/>
                 <constraint firstAttribute="bottom" secondItem="tsS-zO-9nC" secondAttribute="bottom" id="Rwa-gB-r20"/>
                 <constraint firstItem="zkH-bi-eM4" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="foq-lX-Y5g"/>
-                <constraint firstItem="tsS-zO-9nC" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="sno-bR-5Pm"/>
+                <constraint firstItem="tsS-zO-9nC" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" id="sno-bR-5Pm"/>
                 <constraint firstItem="tsS-zO-9nC" firstAttribute="top" secondItem="zkH-bi-eM4" secondAttribute="bottom" id="t8z-So-NCh"/>
             </constraints>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <connections>
                 <outlet property="textView" destination="tsS-zO-9nC" id="lH0-RJ-ygi"/>
+                <outlet property="titleLab" destination="TJt-s3-1dQ" id="c0j-xN-Dud"/>
             </connections>
             <point key="canvasLocation" x="130.53435114503816" y="-11.619718309859156"/>
         </view>

+ 2 - 0
MiMoLive/MiMoLive/Classes/Live/View/MOClick/MOLikeListView/MOLikeListView.m

@@ -55,6 +55,8 @@
     
     self.tableView.backgroundView = self.noMoreDataView;
     
+    self.titleLab.font = [MOTextTools getTheFontWithSize:16.0 AndFontName:@"Gilroy"];
+    
 }
 
 - (void)getHttpData{

+ 1 - 1
MiMoLive/MiMoLive/Classes/Live/View/MOClick/MOLikeListView/MOLikeListView.xib

@@ -26,7 +26,7 @@
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Tap tap ranking" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="42g-FN-hwc">
                             <rect key="frame" x="55" y="18" width="283" height="17"/>
                             <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                            <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <color key="textColor" red="0.15686274509803921" green="0.15686274509803921" blue="0.15686274509803921" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
                         <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="vbT-xV-B9Q">