Просмотр исходного кода

主播任务界面逻辑 暂时提交

SuperC 1 год назад
Родитель
Сommit
ce36fcdf8a

BIN
MiMoLive/MiMoLive.xcworkspace/xcuserdata/yanxuyao.xcuserdatad/UserInterfaceState.xcuserstate


BIN
MiMoLive/MiMoLive/Assets.xcassets/Live/AnchorTask/icon_a_task_bg.imageset/icon_a_task_bg@2x.png


BIN
MiMoLive/MiMoLive/Assets.xcassets/Live/AnchorTask/icon_a_task_bg.imageset/icon_a_task_bg@3x.png


+ 38 - 15
MiMoLive/MiMoLive/Classes/Live/View/AchorTaskView/View/Cell/MOAnchorTaskDetailCell.m

@@ -29,22 +29,38 @@
     self.selectionStyle = UITableViewCellSelectionStyleNone;
     self.backgroundColor = [UIColor clearColor];
     
-    self.bgView.layer.cornerRadius = 12.0;
-    
-    self.bgView.layer.borderColor = [MOTools colorWithHexString:@"#E3E2E3" alpha:1.0].CGColor;
-    self.bgView.layer.borderWidth = 0.5;
+//    self.bgView.layer.cornerRadius = 12.0;
+//    
+//    self.bgView.layer.borderColor = [MOTools colorWithHexString:@"#E3E2E3" alpha:1.0].CGColor;
+//    self.bgView.layer.borderWidth = 0.5;
     
     self.zuanNumBtn.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
     self.zuanNumBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 2, 0, 0);
     
-    NSArray *colorArr = @[[MOTools colorWithHexString:@"#FF62EE" alpha:1.0],[MOTools colorWithHexString:@"#9923FF" alpha:1.0]];
-    UIImage *image = [MOTools createGradientRectImageWithBounds:CGRectMake(0, 0, 90.0, 30.0) Colors:colorArr GradientType:0];
-    UIImage *grayImg = [MOTools createImageWithColor:[MOTools colorWithHexString:@"#E7E7E7" alpha:1.0]];
+//    NSArray *colorArr = @[[MOTools colorWithHexString:@"#FF62EE" alpha:1.0],[MOTools colorWithHexString:@"#9923FF" alpha:1.0]];
+//    UIImage *image = [MOTools createGradientRectImageWithBounds:CGRectMake(0, 0, 90.0, 30.0) Colors:colorArr GradientType:0];
+    UIImage *image = [MOTools createImageWithColor:kBaseBtnBgColor];
+    UIImage *grayImg = [MOTools createImageWithColor:[MOTools colorWithHexString:@"#C4C4C4" alpha:1.0]];
     [self.getBtn setBackgroundImage:image forState:UIControlStateSelected];
     [self.getBtn setBackgroundImage:grayImg forState:UIControlStateNormal];
-    self.getBtn.layer.cornerRadius = 30.0 / 2.0;
+    self.getBtn.layer.cornerRadius = 24.0 / 2.0;
     self.getBtn.layer.masksToBounds = YES;
     
+    self.titleLab.font = [MOTextTools getTheFontWithSize:12.0 AndFontName:@"Akrobat"];
+    self.timeLab.font = [MOTextTools getTheFontWithSize:12.0 AndFontName:@"Akrobat"];
+    [self.zuanNumBtn setFont:[MOTextTools getTheFontWithSize:16.0 AndFontName:@"Akrobat"]];
+    [self.getBtn setFont:[MOTextTools getTheFontWithSize:12.0 AndFontName:@"Akrobat"]];
+    
+    UIView *lineView = [[UIView alloc] init];
+    lineView.backgroundColor = [MOTools colorWithHexString:@"#DBDBDB" alpha:1.0];
+    [self.contentView addSubview:lineView];
+    [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.equalTo(self.contentView).offset(25.0);
+        make.bottom.equalTo(self.contentView);
+        make.right.equalTo(self.contentView).offset(-25.0);
+        make.height.equalTo(@0.5);
+    }];
+    
 }
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
@@ -70,19 +86,26 @@
     
     [self.zuanNumBtn setTitle:[NSString stringWithFormat:@"%.f*",cellModel.rubine] forState:UIControlStateNormal];
     
-    NSArray *colorArr = @[[MOTools colorWithHexString:@"#FF62EE" alpha:1.0],[MOTools colorWithHexString:@"#9923FF" alpha:1.0]];
-    UIImage *image = [MOTools createGradientRectImageWithBounds:CGRectMake(0, 0, 80.0, 30.0) Colors:colorArr GradientType:0];
+    
+    UIImage *image = [MOTools createImageWithColor:kBaseBtnBgColor];
+    UIImage *whiteImg = [MOTools createImageWithColor:[MOTools colorWithHexString:@"#FFFFFF" alpha:1.0]];
+    UIImage *grayImg = [MOTools createImageWithColor:[MOTools colorWithHexString:@"#C4C4C4" alpha:1.0]];
+    
+    self.getBtn.layer.borderColor = [MOTools colorWithHexString:@"#FFFFFF" alpha:1.0].CGColor;
+    self.getBtn.layer.borderWidth = 0.5;
+    
     if(cellModel.status == 0){
         
-        self.getBtn.selected = NO;
+        self.getBtn.layer.borderColor = [MOTools colorWithHexString:@"#ABABAB" alpha:1.0].CGColor;
+        [self.getBtn setBackgroundImage:whiteImg forState:UIControlStateNormal];
         [self.getBtn setTitle:NSLocalString(@"mimo_anchor_task_unfinished") forState:UIControlStateNormal];
     }
     else if (cellModel.status == 1){
-        self.getBtn.selected = YES;
+        [self.getBtn setBackgroundImage:image forState:UIControlStateNormal];
         [self.getBtn setTitle:NSLocalString(@"mimo_anchor_task_done") forState:UIControlStateNormal];
     }
     else if (cellModel.status == 2){
-        self.getBtn.selected = NO;
+        [self.getBtn setBackgroundImage:grayImg forState:UIControlStateNormal];
         [self.getBtn setTitle:NSLocalString(@"mimo_anchor_task_received") forState:UIControlStateNormal];
     }
     
@@ -99,12 +122,12 @@
     NSString *numStr = [NSString stringWithFormat:@"%.f",minute];
     
     // 创建属性字符串,整体颜色为白色
-    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:contentStr attributes:@{NSForegroundColorAttributeName:[MOTools colorWithHexString:@"#000000" alpha:1.0]}];
+    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:contentStr attributes:@{NSForegroundColorAttributeName:[MOTools colorWithHexString:@"#737373" alpha:1.0]}];
     
     NSRange redRange = [contentStr rangeOfString:numStr];
     if(redRange.location != NSNotFound){
         // 将最后三个字符的颜色设置为红色
-        [attributedString addAttribute:NSForegroundColorAttributeName value:[MOTools colorWithHexString:@"#C43EF8" alpha:1.0] range:redRange];
+        [attributedString addAttribute:NSForegroundColorAttributeName value:kBaseBtnBgColor range:redRange];
     }
     
     return attributedString;

+ 5 - 5
MiMoLive/MiMoLive/Classes/Live/View/AchorTaskView/View/Cell/MOAnchorTaskDetailCell.xib

@@ -28,14 +28,14 @@
                                     <constraint firstAttribute="height" constant="20" id="hL0-BO-GH3"/>
                                 </constraints>
                                 <fontDescription key="fontDescription" type="system" pointSize="15"/>
-                                <nil key="textColor"/>
+                                <color key="textColor" red="0.45098039215686275" green="0.45098039215686275" blue="0.45098039215686275" alpha="1" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MXr-2J-MbR">
-                                <rect key="frame" x="221" y="16" width="100" height="30"/>
+                                <rect key="frame" x="221" y="19" width="100" height="24"/>
                                 <color key="backgroundColor" red="0.90588235294117647" green="0.90588235294117647" blue="0.90588235294117647" alpha="1" colorSpace="calibratedRGB"/>
                                 <constraints>
-                                    <constraint firstAttribute="height" constant="30" id="SEY-Zb-gE8"/>
+                                    <constraint firstAttribute="height" constant="24" id="SEY-Zb-gE8"/>
                                     <constraint firstAttribute="width" constant="100" id="sMX-c8-FC6"/>
                                 </constraints>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
@@ -55,13 +55,13 @@
                                 <fontDescription key="fontDescription" type="system" pointSize="12"/>
                                 <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                 <state key="normal" title="60*" image="icon_a_task_heart">
-                                    <color key="titleColor" red="0.99607843137254903" green="0.29019607843137252" blue="0.39215686274509803" alpha="1" colorSpace="calibratedRGB"/>
+                                    <color key="titleColor" red="1" green="0.32549019607843138" blue="0.36862745098039218" alpha="1" colorSpace="calibratedRGB"/>
                                 </state>
                             </button>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="(0/0)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5jX-Ol-W9Q">
                                 <rect key="frame" x="47" y="15.666666666666668" width="28" height="14.333333333333332"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="12"/>
-                                <nil key="textColor"/>
+                                <color key="textColor" red="0.45098039215686275" green="0.45098039215686275" blue="0.45098039215686275" alpha="1" colorSpace="calibratedRGB"/>
                                 <nil key="highlightedColor"/>
                             </label>
                         </subviews>

+ 4 - 3
MiMoLive/MiMoLive/Classes/Live/View/AchorTaskView/View/TaskProgressView/MOAnchorTaskProgressView.m

@@ -30,16 +30,17 @@
     [super awakeFromNib];
     
     self.titleLab.text = NSLocalString(@"mimo_anchor_task_progress_title");
+    self.titleLab.font = [MOTextTools getTheFontWithSize:16.0 AndFontName:@"Akrobat"];
     
     self.bgImgView.layer.cornerRadius = 12.0;
     self.bgImgView.layer.masksToBounds = YES;
     
-    NSArray *colorArr = @[[MOTools colorWithHexString:@"#FEBD93" alpha:1.0],[MOTools colorWithHexString:@"#FF93E4" alpha:1.0]];
+    NSArray *colorArr = @[[MOTools colorWithHexString:@"#F3E1FF" alpha:1.0],[MOTools colorWithHexString:@"#D0F5FF" alpha:1.0]];
     UIImage *image = [MOTools createGradientRectImageWithBounds:CGRectMake(0, 0, (SCREENWIDTH - 13.0 * 2), 133.0) Colors:colorArr GradientType:0];
     [self.bgImgView setImage:image];
     
-    NSArray *progressViewColorArr = @[[MOTools colorWithHexString:@"#FF62EE" alpha:1.0],[MOTools colorWithHexString:@"#9823FF" alpha:1.0]];
-    UIImage *progressViewImage = [MOTools createGradientRectImageWithBounds:CGRectMake(0, 0, 120, 8.0) Colors:progressViewColorArr GradientType:0];
+    NSArray *progressViewColorArr = @[[MOTools colorWithHexString:@"#98E8FF" alpha:1.0],[MOTools colorWithHexString:@"#8DB0FF" alpha:1.0]];
+    UIImage *progressViewImage = [MOTools createGradientRectImageWithBounds:CGRectMake(0, 0, 120, 8.0) Colors:progressViewColorArr GradientType:1];
     self.progressView.progressImage = progressViewImage;
     self.progressView.trackTintColor = [MOTools colorWithHexString:@"#FFFFFF" alpha:1.0];
     self.progressView.layer.cornerRadius = 8.0 / 2.0;

+ 1 - 1
MiMoLive/MiMoLive/Classes/Live/View/AchorTaskView/View/TaskProgressView/MOAnchorTaskProgressView.xib

@@ -20,7 +20,7 @@
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="直播得红宝石" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HzM-8M-yFv">
                     <rect key="frame" x="15" y="20" width="92" height="18"/>
                     <fontDescription key="fontDescription" type="system" pointSize="15"/>
-                    <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                    <color key="textColor" red="0.45098039215686275" green="0.45098039215686275" blue="0.45098039215686275" alpha="1" colorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>
                 </label>
                 <progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="5Xq-2b-cJN">

+ 4 - 11
MiMoLive/MiMoLive/Classes/Live/View/AchorTaskView/View/TaskProgressView/MOTaskBaseBtnView.m

@@ -36,15 +36,8 @@
     self.zuanBtn.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
     self.zuanBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 3, 0, 0);
     
-    UIFont *customFont = [UIFont fontWithName:@"Source Sans Pro" size:10.0];
-    if(customFont){
-        [self.zuanBtn setFont:customFont];
-        self.timeLab.font = customFont;
-    }
-    else{
-        [self.zuanBtn setFont:[UIFont italicSystemFontOfSize:10.0]];
-        self.timeLab.font = [UIFont italicSystemFontOfSize:10.0];
-    }
+    self.timeLab.textColor = kBaseBtnBgColor;
+    self.timeLab.font = [MOTextTools getTheFontWithSize:12.0 AndFontName:@"Akrobat"];
 
 //    UIImage *normalImg = [UIImage imageNamed:@"icon_a_task_heart"];
 //    normalImg = [normalImg imageByResizeToSize:CGSizeMake(12.0, 12.0) contentMode:UIViewContentModeScaleAspectFit];
@@ -67,15 +60,15 @@
     
     self.bgImgView.hidden = YES;
     self.zuanBtnTop.constant = 8.0;
-    [self.zuanBtn setTitleColor:[MOTools colorWithHexString:@"#FFFB95" alpha:1.0] forState:UIControlStateNormal];
     self.zuanBtn.selected = NO;
     
     if(cellModel.status == 0){
-        
+        [self.zuanBtn setTitleColor:[MOTools colorWithHexString:@"#FF535E" alpha:1.0] forState:UIControlStateNormal];
     }
     else if (cellModel.status == 1){
         self.bgImgView.hidden = NO;
         self.zuanBtnTop.constant = 5.0;
+        [self.zuanBtn setTitleColor:[MOTools colorWithHexString:@"#FFED59" alpha:1.0] forState:UIControlStateNormal];
     }
     else if (cellModel.status == 2){
         self.zuanBtn.selected = YES;

+ 2 - 2
MiMoLive/MiMoLive/Classes/Live/View/AchorTaskView/View/TaskProgressView/MOTaskBaseBtnView.xib

@@ -32,7 +32,7 @@
                     <fontDescription key="fontDescription" type="system" pointSize="10"/>
                     <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                     <state key="normal" title="0K" image="icon_a_task_heart">
-                        <color key="titleColor" red="1" green="0.94117647058823528" blue="0.30588235294117649" alpha="1" colorSpace="calibratedRGB"/>
+                        <color key="titleColor" red="1" green="0.92941176470588238" blue="0.34901960784313724" alpha="1" colorSpace="calibratedRGB"/>
                     </state>
                     <state key="selected" image="icon_a_task_gray_heart"/>
                     <connections>
@@ -74,7 +74,7 @@
         </view>
     </objects>
     <resources>
-        <image name="icon_a_task_bg" width="49" height="27.333333969116211"/>
+        <image name="icon_a_task_bg" width="47.333332061767578" height="26.333333969116211"/>
         <image name="icon_a_task_gray_heart" width="13" height="11"/>
         <image name="icon_a_task_heart" width="13" height="10.333333015441895"/>
     </resources>