我正在使用下面的代码进行缩放和翻译动画。这会将图像从左下角移动到屏幕中心。下次我做动画时,我想从左下角重新开始。但是动画没有开始。我需要什么来重新启动动画?
// Setup the animation
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:duration];
[UIView setAnimationCurve:curve];
[UIView setAnimationBeginsFromCurrentState:YES];
// The transform matrix
CGAffineTransform transform = CGAffineTransformMakeTranslation(x, y);
CGAffineTransform scale = CGAffineTransformMakeScale(2.0,2.0);
CGAffineTransform scale_transform = CGAffineTransformConcat(transform,scale);
image.transform = scale_transform;
[UIView commitAnimations];