试试这个代码:
[UIView animationWithDuration:2 animations:^{
CGAffineTransform *transform = CGAffineTransformScale(imageView.transform, 0.01, 0.01);
[imageview setTransform:transform];
[imageview setAlpha:0];
}
completion:^(BOOL finished){
[imageview removeFromSuperview];
}];
这将考虑现有的 imageView 转换。(您是否有可能已经对这个 imageView 应用了转换?)
您可以尝试的另一件事是添加:UIViewAnimationOptionBeginFromCurrentState
作为动画方法的选项。您将不得不使用:
+ (void)animateWithDuration:(NSTimeInterval)duration delay:(NSTimeInterval)delay options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion{
}