修改连送偶现不显示问题

This commit is contained in:
启星
2025-12-29 23:28:26 +08:00
parent 890c5f59ed
commit 1a9d6650f5
3 changed files with 38 additions and 29 deletions

View File

@@ -127,5 +127,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong)CABasicAnimation *animation;
@property (nonatomic,copy)void(^dissMissBlock)(QXGiftModel *gift);
-(void)startAnimation;
@end
NS_ASSUME_NONNULL_END

View File

@@ -1262,17 +1262,14 @@
//
[self.layer addSublayer:circleLayer];
//
[circleLayer addAnimation:self.animation forKey:@"circleAnimation"];
// [circleLayer addAnimation:self.animation forKey:@"circleAnimation"];
circleLayer.strokeEnd = 0.0f;
}
-(void)sendAction{
self.circleLayer.strokeEnd = 1.0f;
[self.circleLayer removeAllAnimations];
_animation = nil;
[self.circleLayer addAnimation:self.animation forKey:@"circleAnimation"];
[self startAnimation];
[[QXGlobal shareGlobal] vibrationFeedback];
switch (self.sendType) {
case QXSendGiftViewTypeRoom:
@@ -1300,6 +1297,13 @@
break;
}
}
-(void)startAnimation{
self.circleLayer.strokeEnd = 1.0f;
[self.circleLayer removeAllAnimations];
_animation = nil;
[self.circleLayer addAnimation:self.animation forKey:@"circleAnimation"];
}
-(CABasicAnimation *)animation{
if (!_animation) {
_animation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];

View File

@@ -244,7 +244,9 @@ QXRoomUserInfoViewDelegate
[self.view addSubview:self.redBagTagView];
[self.view addSubview:self.dayTaskTagView];
[self setupEffectView];
[self.view addSubview:self.continuousView];
self.continuousView.hidden = YES;
[self.view bringSubviewToFront:self.continuousView];
// [self.view addSubview:self.headlineView];
}
#pragma mark -
@@ -1793,28 +1795,30 @@ QXRoomUserInfoViewDelegate
// [_sendGiftView reloadData];
MJWeakSelf
_sendGiftView.roomSendSuccessBlock = ^(QXSendGiftViewType sendType, QXGiftModel * _Nonnull giftModel, NSString * _Nonnull giftCount, NSString * _Nonnull userId, NSString * _Nonnull optionId) {
// if (self->_continuousView == nil) {
[weakSelf.view addSubview:weakSelf.continuousView];
[weakSelf.view bringSubviewToFront:weakSelf.continuousView];
// }
weakSelf.continuousView.giftModel = giftModel;
weakSelf.continuousView.sendType = sendType;
weakSelf.continuousView.userId = userId;
weakSelf.continuousView.giftCount = giftCount;
switch (sendType) {
case QXSendGiftViewTypeFriend:{
weakSelf.continuousView.heartId = optionId;
weakSelf.continuousView.auctionId = @"";
dispatch_async(dispatch_get_main_queue(), ^{
weakSelf.continuousView.hidden = NO;
[weakSelf.continuousView startAnimation];
weakSelf.continuousView.giftModel = giftModel;
weakSelf.continuousView.sendType = sendType;
weakSelf.continuousView.userId = userId;
weakSelf.continuousView.giftCount = giftCount;
switch (sendType) {
case QXSendGiftViewTypeFriend:{
weakSelf.continuousView.heartId = optionId;
weakSelf.continuousView.auctionId = @"";
}
break;
case QXSendGiftViewTypeAuction:{
weakSelf.continuousView.auctionId = optionId;
weakSelf.continuousView.heartId = @"";
}
break;
default:
break;
}
break;
case QXSendGiftViewTypeAuction:{
weakSelf.continuousView.auctionId = optionId;
weakSelf.continuousView.heartId = @"";
}
break;
default:
break;
}
});
};
_sendGiftView.jumpActivityGiftBlock = ^(QXGiftModel * _Nonnull gift, NSString * _Nonnull userIds) {
@@ -1959,8 +1963,7 @@ QXRoomUserInfoViewDelegate
_continuousView = [[QXContinuousGiftView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-65-12, SCREEN_HEIGHT-70-78-52-34-20-70, 65, 65)];
_continuousView.roomId = self.roomId;
_continuousView.dissMissBlock = ^(QXGiftModel * _Nonnull gift) {
[weakSelf.continuousView removeFromSuperview];
self->_continuousView = nil;
weakSelf.continuousView.hidden = YES;
};
}
return _continuousView;