Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

重复弹出一个View的问题 #23

Open
dhui68 opened this issue Dec 22, 2017 · 0 comments
Open

重复弹出一个View的问题 #23

dhui68 opened this issue Dec 22, 2017 · 0 comments

Comments

@dhui68
Copy link

dhui68 commented Dec 22, 2017

在TYAlertScaleFadeAnimation.m文件中,
[UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{
alertController.backgroundView.alpha = 0.0;
switch (alertController.preferredStyle) {
case TYAlertControllerStyleAlert:
alertController.alertView.alpha = 0.0;
alertController.alertView.transform = CGAffineTransformMakeScale(0.1, 0.1);
break;
case TYAlertControllerStyleActionSheet:
alertController.alertView.transform = CGAffineTransformMakeTranslation(0, CGRectGetHeight(alertController.alertView.frame));
break;
default:
break;
}
} completion:^(BOOL finished) {
[transitionContext completeTransition:YES];
}];
我发现当alertController dismissAnimateTransition的时候,alertView动画执行了缩小0.1 但动画完成了没有执行 alertController.alertView.transform = CGAffineTransformIdentity;这样重复弹出一个View就不是原始的frame,还有发现[_alertView addConstraintWidth:CGRectGetWidth(_alertView.frame) height:CGRectGetHeight(_alertView.frame)]; 重复的添加宽度和高度约束

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant