我有一个视图,其中有3个按钮作为子视图。视图旋转360度,因此当按钮旋转时问题是当我单击按钮时,因为按钮的框架不会改变位置,因此它会触发错误的触摸事件。
CABasicAnimation *fullRotation1;
CGFloat duration1 = 8.0;
float repeatCount1 = 0;
fullRotation1 = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
fullRotation1.fromValue = [NSNumber numberWithFloat:0];
fullRotation1.toValue = [NSNumber numberWithFloat:((360 * M_PI) / 180)];
fullRotation1.duration = duration1;
if (repeatCount1 == 0)
fullRotation1.repeatCount = MAXFLOAT;
else
fullRotation1.repeatCount = repeatCount1;
[imgrotatebutton.layer addAnimation:fullRotation1 forKey:@"360"];
我应该如何获得与图层一起移动的按钮框架
由于