修改连送偶现不显示问题
This commit is contained in:
@@ -127,5 +127,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
|
|
||||||
@property (nonatomic,strong)CABasicAnimation *animation;
|
@property (nonatomic,strong)CABasicAnimation *animation;
|
||||||
@property (nonatomic,copy)void(^dissMissBlock)(QXGiftModel *gift);
|
@property (nonatomic,copy)void(^dissMissBlock)(QXGiftModel *gift);
|
||||||
|
|
||||||
|
-(void)startAnimation;
|
||||||
@end
|
@end
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
|||||||
@@ -1262,17 +1262,14 @@
|
|||||||
// 添加到视图
|
// 添加到视图
|
||||||
[self.layer addSublayer:circleLayer];
|
[self.layer addSublayer:circleLayer];
|
||||||
// 设置动画完成后的状态
|
// 设置动画完成后的状态
|
||||||
[circleLayer addAnimation:self.animation forKey:@"circleAnimation"];
|
// [circleLayer addAnimation:self.animation forKey:@"circleAnimation"];
|
||||||
circleLayer.strokeEnd = 0.0f;
|
circleLayer.strokeEnd = 0.0f;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
-(void)sendAction{
|
-(void)sendAction{
|
||||||
self.circleLayer.strokeEnd = 1.0f;
|
[self startAnimation];
|
||||||
[self.circleLayer removeAllAnimations];
|
|
||||||
_animation = nil;
|
|
||||||
[self.circleLayer addAnimation:self.animation forKey:@"circleAnimation"];
|
|
||||||
[[QXGlobal shareGlobal] vibrationFeedback];
|
[[QXGlobal shareGlobal] vibrationFeedback];
|
||||||
switch (self.sendType) {
|
switch (self.sendType) {
|
||||||
case QXSendGiftViewTypeRoom:
|
case QXSendGiftViewTypeRoom:
|
||||||
@@ -1300,6 +1297,13 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)startAnimation{
|
||||||
|
self.circleLayer.strokeEnd = 1.0f;
|
||||||
|
[self.circleLayer removeAllAnimations];
|
||||||
|
_animation = nil;
|
||||||
|
[self.circleLayer addAnimation:self.animation forKey:@"circleAnimation"];
|
||||||
|
}
|
||||||
-(CABasicAnimation *)animation{
|
-(CABasicAnimation *)animation{
|
||||||
if (!_animation) {
|
if (!_animation) {
|
||||||
_animation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
|
_animation = [CABasicAnimation animationWithKeyPath:@"strokeEnd"];
|
||||||
|
|||||||
@@ -244,7 +244,9 @@ QXRoomUserInfoViewDelegate
|
|||||||
[self.view addSubview:self.redBagTagView];
|
[self.view addSubview:self.redBagTagView];
|
||||||
[self.view addSubview:self.dayTaskTagView];
|
[self.view addSubview:self.dayTaskTagView];
|
||||||
[self setupEffectView];
|
[self setupEffectView];
|
||||||
|
[self.view addSubview:self.continuousView];
|
||||||
|
self.continuousView.hidden = YES;
|
||||||
|
[self.view bringSubviewToFront:self.continuousView];
|
||||||
// [self.view addSubview:self.headlineView];
|
// [self.view addSubview:self.headlineView];
|
||||||
}
|
}
|
||||||
#pragma mark - 特效
|
#pragma mark - 特效
|
||||||
@@ -1793,28 +1795,30 @@ QXRoomUserInfoViewDelegate
|
|||||||
// [_sendGiftView reloadData];
|
// [_sendGiftView reloadData];
|
||||||
MJWeakSelf
|
MJWeakSelf
|
||||||
_sendGiftView.roomSendSuccessBlock = ^(QXSendGiftViewType sendType, QXGiftModel * _Nonnull giftModel, NSString * _Nonnull giftCount, NSString * _Nonnull userId, NSString * _Nonnull optionId) {
|
_sendGiftView.roomSendSuccessBlock = ^(QXSendGiftViewType sendType, QXGiftModel * _Nonnull giftModel, NSString * _Nonnull giftCount, NSString * _Nonnull userId, NSString * _Nonnull optionId) {
|
||||||
// if (self->_continuousView == nil) {
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[weakSelf.view addSubview:weakSelf.continuousView];
|
weakSelf.continuousView.hidden = NO;
|
||||||
[weakSelf.view bringSubviewToFront:weakSelf.continuousView];
|
[weakSelf.continuousView startAnimation];
|
||||||
// }
|
weakSelf.continuousView.giftModel = giftModel;
|
||||||
weakSelf.continuousView.giftModel = giftModel;
|
weakSelf.continuousView.sendType = sendType;
|
||||||
weakSelf.continuousView.sendType = sendType;
|
weakSelf.continuousView.userId = userId;
|
||||||
weakSelf.continuousView.userId = userId;
|
weakSelf.continuousView.giftCount = giftCount;
|
||||||
weakSelf.continuousView.giftCount = giftCount;
|
switch (sendType) {
|
||||||
switch (sendType) {
|
case QXSendGiftViewTypeFriend:{
|
||||||
case QXSendGiftViewTypeFriend:{
|
weakSelf.continuousView.heartId = optionId;
|
||||||
weakSelf.continuousView.heartId = optionId;
|
weakSelf.continuousView.auctionId = @"";
|
||||||
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) {
|
_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 = [[QXContinuousGiftView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-65-12, SCREEN_HEIGHT-70-78-52-34-20-70, 65, 65)];
|
||||||
_continuousView.roomId = self.roomId;
|
_continuousView.roomId = self.roomId;
|
||||||
_continuousView.dissMissBlock = ^(QXGiftModel * _Nonnull gift) {
|
_continuousView.dissMissBlock = ^(QXGiftModel * _Nonnull gift) {
|
||||||
[weakSelf.continuousView removeFromSuperview];
|
weakSelf.continuousView.hidden = YES;
|
||||||
self->_continuousView = nil;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return _continuousView;
|
return _continuousView;
|
||||||
|
|||||||
Reference in New Issue
Block a user