我的代码在下面给出,
int i;
for (i=1; i < 13; i++ ){
UIButton * myButton1 = (UIButton *)([self.view viewWithTag:i]);
NSString *imageLoop2=[NSString stringWithFormat:@"%@",[arr1 objectAtIndex:i-1]];
[UIView beginAnimations:@"Flip" context:NULL];
[UIView setAnimationDuration:0.60];
[UIView setAnimationDelegate:self];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:myButton1 cache:NO];
myButton1.userInteractionEnabled = NO;
myButton1.alpha=1.0f;
[myButton1 setBackgroundImage:[UIImage imageNamed:imageLoop2] forState:UIControlStateNormal];
[UIView commitAnimations];
}
它在同一时间内翻转所有按钮。
但我的问题是当一个接一个“第一个按钮完成翻转动画然后第二个按钮开始翻转”时它会翻转
请给我建议。
谢谢