我想应用超过 10 个元素的摆动动画。它适用于 6 - 9 个元素。如果元素摆动超过 10 次,则应用成功,但是,如果我在动画应用程序没有响应时按下主页按钮。
我的代码是:
while(subviews)
{
[UIView beginAnimations:@"wiggle" context:nil];
[UIView setAnimationDuration:0.1];
[UIView setAnimationRepeatAutoreverses:YES];
[UIView setAnimationRepeatCount:FLT_MAX];
//wiggle 1 degree both sides
touchView.transform = CGAffineTransformMakeRotation(0.0174532925);
touchView.transform = CGAffineTransformMakeRotation(-0.0174532925);
[UIView commitAnimations];
}