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];

これら 2 つのテキストビュー間でどのようにアニメーション化できますか。

手伝ってくれてありがとう

4

1 に答える 1

1

これは、最初のテキスト ビューを非表示にし、2 番目のテキスト ビューを表示するように機能するはずです。

[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 に答える