礼物面板的优化

This commit is contained in:
fengshuo
2022-08-23 20:08:11 +08:00
parent 4b3f4baa86
commit c111eadf00
4 changed files with 87 additions and 23 deletions

View File

@@ -287,6 +287,10 @@
} else {
count = model.giftNumber;
}
if (self.segmentType == GiftSegmentType_Graffiti) {
count = [NSString stringWithFormat:@"%ld", self.graffitiPoint.count];
}
return count;
}
@@ -422,6 +426,7 @@
self.giftInfoView.hidden = YES;
self.graffitiView.hidden = NO;
self.graffitiView.price = info.goldPrice;
self.giftBarView.drawGiftCount = 0;
[[SDWebImageManager sharedManager] loadImageWithURL:[NSURL URLWithString:info.giftUrl] options:SDWebImageProgressiveLoad progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
if (error == nil && image) {
self.graffitiView.image = image;
@@ -429,6 +434,8 @@
self.giftInfoView.hidden = NO;
}
}];
} else {
self.giftBarView.drawGiftCount = 10;
}
}
@@ -449,6 +456,7 @@
- (void)xPGraffitiGiftView:(XPGraffitiGiftView *)view didDrawCompletion:(NSArray *)pointArray {
self.graffitiPoint = pointArray;
self.giftBarView.drawGiftCount = self.graffitiPoint.count;
}
#pragma mark - XPGiftProtocol