如何为UIViewAnimationTransitionCurlUp这样的视图设置动画?

时间:2009-09-21 16:34:20

标签: iphone xcode uiview

我想为UIViewAnimationTransitionCurlUp等视图设置动画。

我不知道确切的方法。

2 个答案:

答案 0 :(得分:3)

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.2];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:yourView cache:YES];
[yourView changeSomethingToThePositionOrWhatever];
[UIView commitAnimations];

答案 1 :(得分:2)

[UIView beginAnimations:@"" context:nil];   
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES];  
[UIView setAnimationDuration:1.0];

// Make your changes
// show and hide views


[UIView commitAnimations];

also check docs