views:

181

answers:

1

Below is code that I'm using to swap views

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

How can I get the cool page turning animation (as with iBook or ROAD RAGE SIGN) I don't want the user to actually tap and drag his finger on the screen. I want him to push a button and the animation occurs by itself.

+1  A: 

Have you looked at UIViewAnimationTransition values? Use them in a UIView animation block. eg:

[UIView beginAnimations:nil context:nil];
[UIView setAnimationTransition: UIViewAnimationTransitionCurlUp 
forView:self.view cache:YES];
[UIView commitAnimations];
Paul Lynch
thats great but how do you slow the animation down. things move so quickly onmy screen that i cant tell.
Cocoa Dev
Set a duration.
Paul Lynch