完成房间动画类重构
This commit is contained in:
@@ -38,20 +38,22 @@
|
|||||||
CGFloat height = kGetScaleWidth(70);
|
CGFloat height = kGetScaleWidth(70);
|
||||||
|
|
||||||
PIUniversalBannerModel *model = [PIUniversalBannerModel modelWithDictionary:attachment.data];
|
PIUniversalBannerModel *model = [PIUniversalBannerModel modelWithDictionary:attachment.data];
|
||||||
GameUniversalBannerView *bannerView = [[GameUniversalBannerView alloc] initWithFrame:CGRectMake(KScreenWidth, 80, width, height)];
|
GameUniversalBannerView *bannerView = [[GameUniversalBannerView alloc] initWithFrame:CGRectMake(KScreenWidth, 0, width, height)];
|
||||||
bannerView.model = model;
|
bannerView.model = model;
|
||||||
bannerView.completeDisplay = complete;
|
bannerView.completeDisplay = complete;
|
||||||
bannerView.didTapGo = go;
|
bannerView.didTapGo = go;
|
||||||
bannerView.gameID = model.skipContent;
|
bannerView.gameID = model.skipContent;
|
||||||
[superView addSubview:bannerView];
|
[superView addSubview:bannerView];
|
||||||
|
|
||||||
|
// TODO: 添加手势 | 调整为 pop 动画
|
||||||
|
|
||||||
@kWeakify(bannerView);
|
@kWeakify(bannerView);
|
||||||
[UIView animateWithDuration:0.25 animations:^{
|
[UIView animateWithDuration:0.25 animations:^{
|
||||||
bannerView.center = CGPointMake(superView.center.x, height/2 + 80);
|
bannerView.center = CGPointMake(superView.center.x, height/2 + 0);
|
||||||
} completion:^(BOOL finished) {
|
} completion:^(BOOL finished) {
|
||||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
[UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
|
[UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
|
||||||
bannerView.frame = CGRectMake(-KScreenWidth, 80, width, height);
|
bannerView.frame = CGRectMake(-KScreenWidth, 0, width, height);
|
||||||
} completion:^(BOOL finished) {
|
} completion:^(BOOL finished) {
|
||||||
@kStrongify(bannerView);
|
@kStrongify(bannerView);
|
||||||
[bannerView removeFromSuperview];
|
[bannerView removeFromSuperview];
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -269,8 +269,9 @@ GiftAnimationDelegate>
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (attachment.first == CustomMessageType_Gift && attachment.second == Custom_Message_Sub_Gift_ChannelNotify){///广播 全服礼物飘屏
|
if (attachment.first == CustomMessageType_Gift && attachment.second == Custom_Message_Sub_Gift_ChannelNotify){///广播 全服礼物飘屏
|
||||||
|
///
|
||||||
// [self receiveBroadcastGift:attachment];
|
// [self receiveBroadcastGift:attachment];
|
||||||
[self receiveRoomGiftBanner:attachment];
|
// [self receiveRoomGiftBanner:attachment];
|
||||||
} else if (attachment.first == CustomMessageType_Noble_VIP && attachment.second == Custom_Message_Sub_Room_Noble_LevelUp_Suspend) {///VIP升级全服飘屏
|
} else if (attachment.first == CustomMessageType_Noble_VIP && attachment.second == Custom_Message_Sub_Room_Noble_LevelUp_Suspend) {///VIP升级全服飘屏
|
||||||
[self receiveNobleLevelUp:attachment];
|
[self receiveNobleLevelUp:attachment];
|
||||||
}else if(attachment.first == CustomMessageType_LuckyBag && attachment.second == Custom_Message_Sub_Room_Gift_LuckBag_FullScree){
|
}else if(attachment.first == CustomMessageType_LuckyBag && attachment.second == Custom_Message_Sub_Room_Gift_LuckBag_FullScree){
|
||||||
@@ -892,7 +893,6 @@ GiftAnimationDelegate>
|
|||||||
[self createTreasureFairyBannerAnimation:giftModel];
|
[self createTreasureFairyBannerAnimation:giftModel];
|
||||||
}
|
}
|
||||||
[self.animationListB addObject:giftModel];
|
[self.animationListB addObject:giftModel];
|
||||||
|
|
||||||
}
|
}
|
||||||
- (void)createTreasureFairyBannerAnimation:(PIBaseAnimationViewModel *)attatchment {
|
- (void)createTreasureFairyBannerAnimation:(PIBaseAnimationViewModel *)attatchment {
|
||||||
self.isPlayOfB = YES;
|
self.isPlayOfB = YES;
|
||||||
|
Reference in New Issue
Block a user