view进入和退出的动画

1、UIViewController的presentModalViewController可做从下往上的进进入和退出


2、UINavigationController 的pushViewController可以从右往左一层层进入和退出


3、给UIView设置动画,可以做任何方向的进入和退出效果,例如:

[UIView beginAnimations:@"ViewFlip" context:nil];

[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

photoCommentViewControl.view.frame = CGRectMake(0, 0, 320, 480);

[UIView animateWithDuration:1.0 animations:^{photoCommentViewControl.view.frame = CGRectMake(320, 0, 320, 480);}

completion:^(BOOL finished){

}];

[UIView commitAnimations];

上面代码中的view会从0,0点移动到320,0,从左向右移出屏幕