[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES];
alarmViewController = [[Alarm开发者_JS百科ViewController alloc] init];
[self.navigationController pushViewController:alarmViewController animated:YES];
[alarmViewController release];
[UIView commitAnimations];
I just want the viewcontroller flip like opening a book page,but it does not work like this.And I have a question that whether navigationController can animate this effect?
Since you are already putting the navigationController
in an animation block. Mark animated:NO
-
[self.navigationController pushViewController:alarmViewController animated:NO];
when we actually call pushViewController:
we are setting the animated value to NO. This disables the Navigation Controller's default animation. Instead, the block of code uses the defined transition.
精彩评论