这是我的翻转动画代码,我使用 2 个视图,即 viewMain 和 viewStart
- (IBAction)readyBtn:(id)sender {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:[self view] cache:YES];
[[self view] addSubview:viewStart];
[UIView commitAnimations];
}
- (IBAction)startBtn:(id)sender {
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:[self view] cache:YES];
[viewStart removeFromSuperview];
[UIView commitAnimations];
}
在我运行它之后,我的 viewMain 被翻转到相同的 viewMain,它不能将翻转更改为 viewStart。如何解决?