修复bug

This commit is contained in:
liyuhua
2024-01-31 10:43:03 +08:00
parent 910cb0ab0e
commit 67ae3508fa
10 changed files with 48 additions and 37 deletions

View File

@@ -131,10 +131,7 @@
[_unlockGiftImageView loadImageWithUrl:_unlockModel.targetGift.giftUrl completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
self.unlockGiftImageView.image = image;
}];
NSString *text = [NSString stringWithFormat:@"送出 %d个 %@可解锁",_unlockModel.condition,_baseModel.giftName];
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:text attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:10 weight:UIFontWeightRegular],NSForegroundColorAttributeName:[UIColor whiteColor]}];
[textAtt addAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xFFDA24),NSFontAttributeName:[UIFont systemFontOfSize:10 weight:UIFontWeightMedium]} range:[text rangeOfString:[NSString stringWithFormat:@"%d个",_unlockModel.condition]]];
_unlockTitleView.attributedText = textAtt;
NSMutableAttributedString *numAtt = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%d/%d",_unlockModel.process,_unlockModel.condition] attributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xCED1DB),NSFontAttributeName:[UIFont systemFontOfSize:9 weight:UIFontWeightRegular]}];
_unlockNumView.attributedText = numAtt;
@@ -153,9 +150,17 @@
_unlockIconView.hidden = NO;
[self setVeiwLucency:0.5];
self.contentView.layer.borderColor = UIColorRGBAlpha(0xFFDA24, 0.5).CGColor ;
NSString *text = [NSString stringWithFormat:@"送出 %d个 %@可解锁",_unlockModel.condition,_baseModel.giftName];
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:text attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:10 weight:UIFontWeightRegular],NSForegroundColorAttributeName:[UIColor whiteColor]}];
[textAtt addAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xFFDA24),NSFontAttributeName:[UIFont systemFontOfSize:10 weight:UIFontWeightMedium]} range:[text rangeOfString:[NSString stringWithFormat:@"%d个",_unlockModel.condition]]];
_unlockTitleView.attributedText = textAtt;
}else{
_unlockIconView.hidden = YES;
self.contentView.layer.borderColor = UIColorRGBAlpha(0xFFDA24, 1).CGColor ;
NSString *text = [NSString stringWithFormat:@"送出 %d个 %@已解锁",_unlockModel.condition,_baseModel.giftName];
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:text attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:10 weight:UIFontWeightRegular],NSForegroundColorAttributeName:[UIColor whiteColor]}];
[textAtt addAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xFFDA24),NSFontAttributeName:[UIFont systemFontOfSize:10 weight:UIFontWeightMedium]} range:[text rangeOfString:[NSString stringWithFormat:@"%d个",_unlockModel.condition]]];
_unlockTitleView.attributedText = textAtt;
}
if (!_baseModel.isSelect){
self.contentView.layer.borderWidth = _unlockModel.isSelect ? 1 : 0;