涂鸦礼物没有选择人的话不显示价值

This commit is contained in:
fengshuo
2022-08-24 19:34:31 +08:00
parent d683903509
commit da0ec1b2c9

View File

@@ -243,6 +243,7 @@
- (void)closeButtonAction:(UIButton *)sender {
[self clearData];
[self cratePriceAttribute];
if (self.delegate && [self.delegate respondsToSelector:@selector(xPGraffitiGiftView:didDrawCompletion:)]) {
[self.delegate xPGraffitiGiftView:self didDrawCompletion:self.pointArray];
}
@@ -258,7 +259,7 @@
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:title attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14], NSForegroundColorAttributeName:[UIColor whiteColor]}];
self.titleLabel.attributedText = attribute;
} else {
NSInteger number = self.selectUidNumber > 0 ? self.selectUidNumber : 1;
NSInteger number = self.selectUidNumber > 0 ? self.selectUidNumber : 0;
NSString * count = [NSString stringWithFormat:@"%ld", self.viewsArray.count];
NSString * price = [NSString stringWithFormat:@"%.0f", self.viewsArray.count * self.price * number];
NSString * title = [NSString stringWithFormat:@"已画%@个,需花费%@钻石", count, price];