完成房间动画类重构
This commit is contained in:
@@ -38,20 +38,22 @@
|
||||
CGFloat height = kGetScaleWidth(70);
|
||||
|
||||
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.completeDisplay = complete;
|
||||
bannerView.didTapGo = go;
|
||||
bannerView.gameID = model.skipContent;
|
||||
[superView addSubview:bannerView];
|
||||
|
||||
// TODO: 添加手势 | 调整为 pop 动画
|
||||
|
||||
@kWeakify(bannerView);
|
||||
[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) {
|
||||
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:^{
|
||||
bannerView.frame = CGRectMake(-KScreenWidth, 80, width, height);
|
||||
bannerView.frame = CGRectMake(-KScreenWidth, 0, width, height);
|
||||
} completion:^(BOOL finished) {
|
||||
@kStrongify(bannerView);
|
||||
[bannerView removeFromSuperview];
|
||||
|
Reference in New Issue
Block a user