|
@@ -29,22 +29,38 @@
|
|
|
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
|
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
|
|
self.backgroundColor = [UIColor clearColor];
|
|
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.semanticContentAttribute = UISemanticContentAttributeForceRightToLeft;
|
|
|
self.zuanNumBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 2, 0, 0);
|
|
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:image forState:UIControlStateSelected];
|
|
|
[self.getBtn setBackgroundImage:grayImg forState:UIControlStateNormal];
|
|
[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.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 {
|
|
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
|
@@ -70,19 +86,26 @@
|
|
|
|
|
|
|
|
[self.zuanNumBtn setTitle:[NSString stringWithFormat:@"%.f*",cellModel.rubine] forState:UIControlStateNormal];
|
|
[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){
|
|
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];
|
|
[self.getBtn setTitle:NSLocalString(@"mimo_anchor_task_unfinished") forState:UIControlStateNormal];
|
|
|
}
|
|
}
|
|
|
else if (cellModel.status == 1){
|
|
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];
|
|
[self.getBtn setTitle:NSLocalString(@"mimo_anchor_task_done") forState:UIControlStateNormal];
|
|
|
}
|
|
}
|
|
|
else if (cellModel.status == 2){
|
|
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];
|
|
[self.getBtn setTitle:NSLocalString(@"mimo_anchor_task_received") forState:UIControlStateNormal];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -99,12 +122,12 @@
|
|
|
NSString *numStr = [NSString stringWithFormat:@"%.f",minute];
|
|
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];
|
|
NSRange redRange = [contentStr rangeOfString:numStr];
|
|
|
if(redRange.location != NSNotFound){
|
|
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;
|
|
return attributedString;
|