我有一个我正在尝试制作动画的 UIView。
[UIView beginAnimations:@"scaleAnimation" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.5];
CGRect f = self.frame;
f.size.width = f.size.width * 2;
f.size.height = f.size.height * 2;
self.frame = f;
[UIView commitAnimations];
动画效果很好,但无论如何我可以让动画沿着中心缩放吗?
现在,看起来该点位于左上角。
使用 CGAffineTransform 比例 = CGAffineTransformMakeScale(2.0, 2.0); 沿着中心做动画,但是做一个触摸事件,当我试图检测 UIView 的透明区域时,这些点似乎都搞砸了。
谢谢你,
三通