主播评级总是显示s级的问题
This commit is contained in:
@@ -101,7 +101,12 @@
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:task attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:11], NSForegroundColorAttributeName:[ThemeColor colorWithHexString:@"#8A8CAB"]}];
|
||||
[attribute addAttribute:NSForegroundColorAttributeName value:[ThemeColor colorWithHexString:@"#F86099"] range:[task rangeOfString:diamond]];
|
||||
self.taskLabel.attributedText = attribute;
|
||||
self.titleLabel.text = [NSString stringWithFormat:@"还差%ld钻可完成", (_levelInfo.targetDiamond - _levelInfo.currentDiamond)];
|
||||
if (_levelInfo.currentDiamond > _levelInfo.targetDiamond) {
|
||||
self.titleLabel.text = @"已完成";
|
||||
} else {
|
||||
self.titleLabel.text = [NSString stringWithFormat:@"还差%ld钻可完成", (_levelInfo.targetDiamond - _levelInfo.currentDiamond)];
|
||||
}
|
||||
|
||||
CGFloat itemWidth = ((CGFloat)_levelInfo.currentDiamond / (CGFloat)_levelInfo.targetDiamond)* 260;
|
||||
[self.progressView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(itemWidth);
|
||||
@@ -112,7 +117,12 @@
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:task attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:11], NSForegroundColorAttributeName:[ThemeColor colorWithHexString:@"#8A8CAB"]}];
|
||||
[attribute addAttribute:NSForegroundColorAttributeName value:[ThemeColor colorWithHexString:@"#F86099"] range:[task rangeOfString:diamond]];
|
||||
self.taskLabel.attributedText = attribute;
|
||||
self.titleLabel.text = [NSString stringWithFormat:@"还差%.0f%@可完成", (_levelInfo.targetReply - _levelInfo.currentReply) * 100, @"%"];
|
||||
if (_levelInfo.currentReply > _levelInfo.targetReply) {
|
||||
self.titleLabel.text = @"已完成";
|
||||
} else {
|
||||
self.titleLabel.text = [NSString stringWithFormat:@"还差%.0f%@可完成", (_levelInfo.targetReply - _levelInfo.currentReply) * 100, @"%"];
|
||||
}
|
||||
|
||||
|
||||
CGFloat itemWidth = _levelInfo.currentReply * 260;
|
||||
[self.progressView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
|
@@ -120,7 +120,6 @@
|
||||
- (void)setLevelInfo:(AnchorLevelModel *)levelInfo {
|
||||
_levelInfo = levelInfo;
|
||||
if (_levelInfo) {
|
||||
_levelInfo.grade = @"S";
|
||||
self.diamondView.levelInfo = _levelInfo;
|
||||
self.replyView.levelInfo = _levelInfo;
|
||||
self.timeView.nextRemaining = _levelInfo.nextRemaining;
|
||||
|
@@ -752,6 +752,7 @@
|
||||
[_anchorLevel setTitleColor:[ThemeColor mainTextColor] forState:UIControlStateNormal];
|
||||
[_anchorLevel setTitleEdgeInsets:UIEdgeInsetsMake(0, 25, 0, 0)];
|
||||
[_anchorLevel addTarget:self action:@selector(anchorLevelAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
_anchorLevel.hidden = YES;
|
||||
}
|
||||
return _anchorLevel;
|
||||
}
|
||||
|
Reference in New Issue
Block a user