0
[baseview addSubview:textView1];
textView1.alpha = 0.0;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:textView1 cache:YES];
textView1.alpha = 1.0;
[UIView commitAnimations];

[baseview addSubview:textView2];
textView2.alpha = 0.0;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:textView2 cache:YES];
textView2.alpha = 1.0;
[UIView commitAnimations];

我如何在这两个文本视图之间制作动画。

感谢帮助

4

1 回答 1

1

这应该可以隐藏第一个文本视图并显示第二个:

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:textView1 cache:YES];
{
    textView1.alpha = 0.0;
    textView2.alpha = 1.0;
}
[UIView commitAnimations];

也许您必须将父视图设置为动画视图(例如self.view)。

于 2013-01-08T17:00:50.633 回答