[UIView transitionWithView:v duration:1 options:(UIViewAnimationOptionCurveEaseIn) animations:^{
// 1. CGFloat y = CGRectGetMaxY(v.frame);
// v.frame = CGRectMake(0, y, 100, 100);
v.transform = CGAffineTransformRotate(v.transform, 0.6);
} completion:^(BOOL finished) {
//还原动画 (使用 1. 方法不能使用这种还原方式)
v.transform = CGAffineTransformIdentity;
}];
动画执行完后,还原原来的位置
最新推荐文章于 2022-11-15 16:35:37 发布