用很酷的页面转动动画交换视图

时间:2010-04-20 15:53:53

标签: objective-c uikit uiviewcontroller core-animation uibutton

下面是我用来交换视图的代码

MySecondViewController *tempVC = [[MySecondViewController alloc] initWithNibName:@"MySecondView"];
[self presentModalViewController:tempVC animated:YES];
[tempVC passDataWithString:@"a string" andColor:yellowcolor];

如何让酷页转动动画(与iBook或ROAD RAGE SIGN一样) 我不希望用户在屏幕上实际点击并拖动他的手指。我希望他按下按钮,动画就会自动发生。

1 个答案:

答案 0 :(得分:1)

您是否查看了UIViewAnimationTransition值?在UIView动画块中使用它们。例如:

[UIView beginAnimations:nil context:nil];
[UIView setAnimationTransition: UIViewAnimationTransitionCurlUp 
forView:self.view cache:YES];
[UIView commitAnimations];