重复弹出一个View的问题
在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)]; 重复的添加宽度和高度约束