Commit f5a5526236c99225e5130ae9accb25686168c7bc
1 parent
d9596393
首页添加W缩写
Showing
1 changed file
with
9 additions
and
1 deletions
CNLiveCMineModule/Classes/inte/View/CNLiveCMineInteHeaderView.m
| ... | ... | @@ -87,7 +87,15 @@ |
| 87 | 87 | _announModel = announModel; |
| 88 | 88 | _activModel = activModel; |
| 89 | 89 | [self.signView setupWithScoreModel:scoreModel taskModel:taskModel announModel:announModel activModel:activModel]; |
| 90 | - NSMutableAttributedString * coin_string = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@积分",[taskModel.integral isNotBlank]?taskModel.integral:@"0"]]; | |
| 90 | + | |
| 91 | + NSString * payString = [taskModel.integral isNotBlank]?taskModel.integral:@"0"; | |
| 92 | + NSString * p = [NSString stringWithFormat:@"%@积分",payString]; | |
| 93 | + NSInteger pay = [payString integerValue]; | |
| 94 | + if (pay >= 10000) { | |
| 95 | + p = [NSString stringWithFormat:@"%.2fW积分",(float)pay/10000]; | |
| 96 | + } | |
| 97 | + | |
| 98 | + NSMutableAttributedString * coin_string = [[NSMutableAttributedString alloc] initWithString:p]; | |
| 91 | 99 | [coin_string addAttribute:NSFontAttributeName value:UIFontCNMake(12) range:[coin_string.string rangeOfString:@"积分"]]; |
| 92 | 100 | [coin_string addAttribute:NSFontAttributeName value:UIFontBoldCNMake(30) range:NSMakeRange(0, [coin_string.string rangeOfString:@"积分"].location)]; |
| 93 | 101 | self.inteLabel.attributedText = coin_string; | ... | ... |