我想让我的变换在平移图像的同时缩放图像,可以用同样的方法吗?
[UIView beginAnimations:annKey context:NULL];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:duration];
[UIView setAnimationCurve:curve];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationDidStopSelector:@selector(animationFinished:finished:context:)];
CGAffineTransform transform = CGAffineTransformMakeTranslation(x, y);
CGAffineTransform scale = CGAffineTransformMakeScale(xx, yy);
image.transform = scale;
image.transform = transform;
[UIView commitAnimations];发布于 2012-07-04 02:01:55
您必须使用CGAffineTransformConcat将这两个转换连接在一起,以转换和缩放视图。您当前只是将比例变换替换为平移。
https://stackoverflow.com/questions/11316488
复制相似问题