btn.transform = CGAffineTransformIdentity; [UIView animateKeyframesWithDuration:0.3 delay:0 options:0 animations: ^{ [UIView addKeyframeWithRelativeStartTime:0.4 relativeDuration:0.3 animations: ^{ CGAffineTransform transformA = CGAffineTransformMakeTranslation(0,-btn.frame.size.height * 0.03); CGAffineTransform transformB = CGAffineTransformScale(transformA, 1.1, 1.1); btn.transform = transformB; }]; } completion:nil];
参考:
https://www.it610.com/article/1187809526427000832.htm
https://www.jianshu.com/p/ca7f9bc62429