修复bug
This commit is contained in:
@@ -433,7 +433,7 @@
|
||||
- (void)createBigPrizeAnimation:(PIBaseAnimationViewModel *)prizeModel {
|
||||
self.isPlayOfB = YES;
|
||||
CGFloat top = self.isPlayOfA == YES ? (self.broadCastHieght + statusbarHeight) : (kNavigationHeight + 15);
|
||||
XPRoomLuckyBigPrizeView * luckyGiftEffectView = [[XPRoomLuckyBigPrizeView alloc] initWithFrame:CGRectMake(KScreenWidth, top, 375, 60)];
|
||||
XPRoomLuckyBigPrizeView * luckyGiftEffectView = [[XPRoomLuckyBigPrizeView alloc] initWithFrame:CGRectMake(KScreenWidth, top, 375, 71)];
|
||||
luckyGiftEffectView.delegate = self;
|
||||
[kWindow addSubview:luckyGiftEffectView];
|
||||
|
||||
@@ -444,36 +444,51 @@
|
||||
springAnimation.springBounciness = 10.f;
|
||||
springAnimation.fromValue = [NSValue valueWithCGPoint:luckyGiftEffectView.center];
|
||||
springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(KScreenWidth / 2, luckyGiftEffectView.center.y)];
|
||||
[springAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
|
||||
if (finished) {
|
||||
POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(KScreenWidth / 2, luckyGiftEffectView.center.y)];
|
||||
moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(-KScreenWidth, luckyGiftEffectView.center.y)];
|
||||
moveAnimation.beginTime = CACurrentMediaTime() + 3;
|
||||
moveAnimation.duration = 0.5;
|
||||
moveAnimation.repeatCount = 1;
|
||||
moveAnimation.removedOnCompletion = YES;
|
||||
[moveAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 7 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
|
||||
POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(0, luckyGiftEffectView.center.y)];
|
||||
moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(-KScreenWidth/2, luckyGiftEffectView.center.y)];
|
||||
moveAnimation.beginTime = CACurrentMediaTime();
|
||||
moveAnimation.duration = 0.5;
|
||||
moveAnimation.repeatCount = 1;
|
||||
moveAnimation.removedOnCompletion = YES;
|
||||
@kWeakify(self);
|
||||
[moveAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
|
||||
@kStrongify(self);
|
||||
if (finished) {
|
||||
[luckyGiftEffectView removeFromSuperview];
|
||||
|
||||
if (self.animationListB.count > 0) {
|
||||
[self.animationListB removeObjectAtIndex:0];
|
||||
}
|
||||
self.isPlayOfB = NO;
|
||||
// if(self.isAnimationListAFinish == YES){
|
||||
// self.isAnimationListAFinish = NO;
|
||||
// [self playAnimationWithModel];
|
||||
// return;
|
||||
// }
|
||||
// if(self.isAnimationListAFinish == YES){
|
||||
// self.isAnimationListAFinish = NO;
|
||||
// [self playAnimationWithModel];
|
||||
// return;
|
||||
// }
|
||||
[self playAnimationWithModel];
|
||||
|
||||
}];
|
||||
[luckyGiftEffectView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];
|
||||
}
|
||||
}];
|
||||
}
|
||||
}];
|
||||
[luckyGiftEffectView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];
|
||||
|
||||
|
||||
});
|
||||
[luckyGiftEffectView pop_addAnimation:springAnimation forKey:@"nobleLevelUpspingOutAnimation"];
|
||||
}
|
||||
#pragma mark - XPRoomLuckyBigPrizeViewDelegate
|
||||
- (void)xPRoomLuckyBigPrizeView:(XPRoomLuckyBigPrizeView *)view luckyGiftInfo:(PIBaseAnimationViewModel *)giftInfo {
|
||||
|
||||
id isShowBroadcastView = [[NSUserDefaults standardUserDefaults]valueForKey:@"kSaveLuckSelectState"];
|
||||
if(isShowBroadcastView == nil){
|
||||
PIRoomGiftBroadcastWindow *broadcastView = [[PIRoomGiftBroadcastWindow alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
||||
broadcastView.isLuck = YES;
|
||||
broadcastView.roodUid = giftInfo.roomUid;
|
||||
broadcastView.roomName = giftInfo.roomTitle;
|
||||
broadcastView.delegate = self;
|
||||
[kWindow addSubview:broadcastView];
|
||||
return;
|
||||
}
|
||||
if (!giftInfo.isInRoomVisiable && giftInfo.roomUid.length > 0 ) {
|
||||
[XPRoomViewController openRoom:giftInfo.roomUid viewController:[XCCurrentVCStackManager shareManager].getCurrentVC];
|
||||
}
|
||||
|
Reference in New Issue
Block a user